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:
parent
150fce41a8
commit
14c4b9e93c
15 changed files with 103 additions and 26 deletions
10
config/locales/models/account/entry/en.yml
Normal file
10
config/locales/models/account/entry/en.yml
Normal 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
|
|
@ -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
|
||||
|
|
9
config/locales/models/import/en.yml
Normal file
9
config/locales/models/import/en.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
en:
|
||||
activerecord:
|
||||
errors:
|
||||
models:
|
||||
import:
|
||||
attributes:
|
||||
raw_csv_str:
|
||||
invalid_csv_format: is not a valid CSV format
|
15
config/locales/models/time_series/trend/en.yml
Normal file
15
config/locales/models/time_series/trend/en.yml
Normal 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
|
9
config/locales/models/time_series/value/en.yml
Normal file
9
config/locales/models/time_series/value/en.yml
Normal 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
|
|
@ -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
|
||||
|
|
|
@ -108,5 +108,4 @@ en:
|
|||
profile_title: Profile
|
||||
save: Save
|
||||
update:
|
||||
file_size_error: File size must be less than 5MB
|
||||
success: Profile updated successfully.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue