1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Refactor: Use native error i18n lookup (#1076)

This commit is contained in:
Pedro Carmona 2024-08-13 01:38:58 +01:00 committed by GitHub
parent 150fce41a8
commit 14c4b9e93c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 103 additions and 26 deletions

View file

@ -0,0 +1,10 @@
---
en:
activerecord:
errors:
models:
account/entry:
attributes:
base:
invalid_sell_quantity: cannot sell %{sell_qty} shares of %{ticker} because
you only own %{current_qty} shares

View file

@ -1,7 +1,17 @@
---
en:
account:
transfer:
from_fallback_name: Originator
name: Transfer from %{from_account} to %{to_account}
to_fallback_name: Receiver
account/transfer:
from_fallback_name: Originator
name: Transfer from %{from_account} to %{to_account}
to_fallback_name: Receiver
activerecord:
errors:
models:
account/transfer:
attributes:
entries:
must_be_from_different_accounts: must be from different accounts
must_be_marked_as_transfer: must be marked as transfer
must_have_an_inflow_and_outflow_that_net_to_zero: must have an inflow
and outflow that net to zero
must_have_exactly_2_entries: must have exactly 2 entries

View file

@ -0,0 +1,9 @@
---
en:
activerecord:
errors:
models:
import:
attributes:
raw_csv_str:
invalid_csv_format: is not a valid CSV format

View file

@ -0,0 +1,15 @@
---
en:
activemodel:
errors:
models:
time_series/trend:
attributes:
current:
must_be_of_the_same_type_as_previous: must be of the same type as previous
must_be_of_type_money_numeric_or_nil: must be of type Money, Numeric,
or nil
previous:
must_be_of_the_same_type_as_current: must be of the same type as current
must_be_of_type_money_numeric_or_nil: must be of type Money, Numeric,
or nil

View file

@ -0,0 +1,9 @@
---
en:
activemodel:
errors:
models:
time_series/value:
attributes:
value:
must_be_a_money_or_numeric: must be a Money or Numeric

View file

@ -11,6 +11,11 @@ en:
password: Password
password_confirmation: Password Confirmation
errors:
user:
cannot_deactivate_admin_with_other_users: Admin cannot delete account while
other users are present. Please delete all members first.
models:
user:
attributes:
base:
cannot_deactivate_admin_with_other_users: Admin cannot delete account
while other users are present. Please delete all members first.
profile_image:
invalid_file_size: file size must be less than %{max_megabytes}MB