diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index d8c02e30e9..2c12d48479 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -284,7 +284,7 @@ class BillController extends Controller } - $request->session()->flash('success', (string) trans('firefly.rescanned_bill', ['total' => $total])); + $request->session()->flash('success', (string) trans_choice('firefly.rescanned_bill', $total)); app('preferences')->mark(); return redirect(route('bills.show', [$bill->id])); diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index bb01495103..bbf72cc08c 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -118,7 +118,7 @@ class BulkController extends Controller } } app('preferences')->mark(); - $request->session()->flash('success', (string) trans('firefly.mass_edited_transactions_success', ['amount' => $count])); + $request->session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count)); // redirect to previous URL: return redirect($this->getPreviousUri('transactions.bulk-edit.uri')); diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 1de06095fa..c5581e58a5 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -114,7 +114,7 @@ class MassController extends Controller app('preferences')->mark(); - session()->flash('success', (string) trans('firefly.mass_deleted_transactions_success', ['amount' => $count])); + session()->flash('success', (string) trans_choice('firefly.mass_deleted_transactions_success', $count)); // redirect to previous URL: return redirect($this->getPreviousUri('transactions.mass-delete.uri')); @@ -188,7 +188,7 @@ class MassController extends Controller } app('preferences')->mark(); - session()->flash('success', (string) trans('firefly.mass_edited_transactions_success', ['amount' => $count])); + session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count )); // redirect to previous URL: return redirect($this->getPreviousUri('transactions.mass-edit.uri')); diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index cbb07df26b..9edafe92c4 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -100,7 +100,7 @@ return [ 'two_factor_lost_fix_owner' => 'Otherwise, email the site owner, :site_owner and ask them to reset your two factor authentication.', 'mfa_backup_code' => 'You have used a backup code to login to Firefly III. It can\'t be used again, so cross it from your list.', 'pref_two_factor_new_backup_codes' => 'Get new backup codes', - 'pref_two_factor_backup_code_count' => 'You have one valid backup code.|You have :count valid backup codes.', + 'pref_two_factor_backup_code_count' => 'You have :count valid backup code.|You have :count valid backup codes.', '2fa_i_have_them' => 'I stored them!', 'warning_much_data' => ':days days of data may take a while to load.', 'registered' => 'You have registered successfully!', @@ -251,7 +251,7 @@ return [ // search 'search' => 'Search', 'search_query' => 'Query', - 'search_found_transactions' => 'Firefly III found one transaction in :time seconds.|Firefly III found :count transactions in :time seconds.', + 'search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.', 'search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.', 'search_for_query' => 'Firefly III is searching for transactions with all of these words in them: :query', 'search_modifier_amount_is' => 'Amount is exactly :value', @@ -429,7 +429,7 @@ return [ 'rule_trigger_currency_is_choice' => 'Transaction currency is..', 'rule_trigger_currency_is' => 'Transaction currency is ":trigger_value"', 'rule_trigger_has_attachments_choice' => 'Has at least this many attachments', - 'rule_trigger_has_attachments' => 'Has at least one attachment|Has at least :trigger_value attachment(s)', + 'rule_trigger_has_attachments' => 'Has at least :count attachment|Has at least :count attachments', 'rule_trigger_store_journal' => 'When a transaction is created', 'rule_trigger_update_journal' => 'When a transaction is updated', 'rule_trigger_has_no_category_choice' => 'Has no category', @@ -527,7 +527,7 @@ return [ 'clear_location' => 'Clear location', 'delete_all_selected_tags' => 'Delete all selected tags', 'select_tags_to_delete' => 'Don\'t forget to select some tags.', - 'deleted_x_tags' => 'Deleted one tag.|Deleted :count tags.', + 'deleted_x_tags' => 'Deleted :count tag.|Deleted :count tags.', 'create_rule_from_transaction' => 'Create rule based on transaction', // preferences @@ -700,7 +700,7 @@ return [ 'convert_expl_d_w' => 'When converting a deposit into a withdrawal, the money will be withdrawn from the displayed source account, instead of being deposited into it.|When converting a deposit into a withdrawal, the money will be withdrawn from the displayed source accounts, instead of being deposited into them. To complete the conversion, please select new destination accounts.', 'convert_expl_d_t' => 'When you convert a deposit into a transfer, the money will be deposited into the listed destination account from any of your asset or liability account.|When you convert a deposit into a transfer, the money will be deposited into the listed destination accounts from any of your asset or liability accounts.', 'convert_expl_t_w' => 'When you convert a transfer into a withdrawal, the money will be spent on the destination account you set here, instead of being transferred away.|When you convert a transfer into a withdrawal, the money will be spent on the destination accounts you set here, instead of being transferred away.', - 'convert_expl_t_d' => 'When you convert a transfer into a deposit, the money will be deposited into the destination account you see here, instead of being transferred into it.|When you convert a transfer into a deposit, the money will be deposited into the destination account(s) you see here, instead of being transferred into them.', + 'convert_expl_t_d' => 'When you convert a transfer into a deposit, the money will be deposited into the destination account you see here, instead of being transferred into it.|When you convert a transfer into a deposit, the money will be deposited into the destination accounts you see here, instead of being transferred into them.', 'convert_select_sources' => 'To complete the conversion, please set the new source account below.|To complete the conversion, please set the new source accounts below.', 'convert_select_destinations' => 'To complete the conversion, please select the new destination account below.|To complete the conversion, please select the new destination accounts below.', 'converted_to_Withdrawal' => 'The transaction has been converted to a withdrawal', @@ -832,7 +832,7 @@ return [ 'store_new_bill' => 'Store new bill', 'stored_new_bill' => 'Stored new bill ":name"', 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', - 'rescanned_bill' => 'Rescanned everything, and linked :total transaction(s) to the bill.', + 'rescanned_bill' => 'Rescanned everything, and linked :count transaction to the bill.|Rescanned everything, and linked :count transactions to the bill.', 'average_bill_amount_year' => 'Average bill amount (:year)', 'average_bill_amount_overall' => 'Average bill amount (overall)', 'bill_is_active' => 'Bill is active', @@ -841,10 +841,10 @@ return [ 'skips_over' => 'skips over', 'bill_store_error' => 'An unexpected error occurred while storing your new bill. Please check the log files', 'list_inactive_rule' => 'inactive rule', - 'bill_edit_rules' => 'Firefly III will attempt to edit the :count rule(s) related to this bill as well. If you\'ve edited these rule(s) yourself however, Firefly III won\'t change anything.', + 'bill_edit_rules' => 'Firefly III will attempt to edit the rule related to this bill as well. If you\'ve edited this rule yourself however, Firefly III won\'t change anything.|Firefly III will attempt to edit the :count rules related to this bill as well. If you\'ve edited these rules yourself however, Firefly III won\'t change anything.', // accounts: - 'inactive_account_link' => 'You have :count inactive (archived) accounts, which you can view on this separate page.', + 'inactive_account_link' => 'You have :count inactive (archived) account, which you can view on this separate page.|You have :count inactive (archived) accounts, which you can view on this separate page.', 'all_accounts_inactive' => 'These are your inactive accounts.', 'active_account_link' => 'This link goes back to your active accounts.', 'account_missing_transaction' => 'Account #:id (":name") cannot be viewed directly, but Firefly is missing redirect information.', @@ -906,7 +906,7 @@ return [ 'cash' => 'cash', 'cant_find_redirect_account' => 'Firefly III tried to redirect you but couldn\'t. Sorry about that. Back to the index.', 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', + 'save_transactions_by_moving' => 'Save this transaction by moving it to another account:|Save these transactions by moving them to another account:', 'stored_new_account' => 'New account ":name" stored!', 'updated_account' => 'Updated account ":name"', 'credit_card_options' => 'Credit card options', @@ -1025,8 +1025,8 @@ return [ 'tag' => 'Tag', 'no_budget_squared' => '(no budget)', 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious. You can delete part of a split transaction from this page, so take care.', - 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', - 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', + 'mass_deleted_transactions_success' => 'Deleted :count transaction.|Deleted :count transactions.', + 'mass_edited_transactions_success' => 'Updated :count transaction.|Updated :count transactions.', 'opt_group_' => '(no account type)', 'opt_group_no_account_type' => '(no account type)', 'opt_group_defaultAsset' => 'Default asset accounts', @@ -1350,10 +1350,10 @@ return [ 'user_data_information' => 'User data', 'user_information' => 'User information', 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', + 'budget_or_budgets' => ':count budget|:count budgets', + 'budgets_with_limits' => ':count budget with configured amount|:count budgets with configured amount', 'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)', - 'tag_or_tags' => 'tag(s)', + 'tag_or_tags' => ':count tag|:count tags', 'configuration_updated' => 'The configuration has been updated', 'setting_is_demo_site' => 'Demo site', 'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.', @@ -1395,7 +1395,7 @@ return [ 'link_type_help_name' => 'Ie. "Duplicates"', 'link_type_help_inward' => 'Ie. "duplicates"', 'link_type_help_outward' => 'Ie. "is duplicated by"', - 'save_connections_by_moving' => 'Save the link between these transaction(s) by moving them to another link type:', + 'save_connections_by_moving' => 'Save the link between these transactions by moving them to another link type:', 'do_not_save_connection' => '(do not save connection)', 'link_transaction' => 'Link transaction', 'link_to_other_transaction' => 'Link this transaction to another transaction', @@ -1580,7 +1580,7 @@ return [ 'edit_recurrence' => 'Edit recurring transaction ":title"', 'recurring_repeats_until' => 'Repeats until :date', 'recurring_repeats_forever' => 'Repeats forever', - 'recurring_repeats_x_times' => 'Repeats :count time(s)', + 'recurring_repeats_x_times' => 'Repeats :count time|Repeats :count times', 'update_recurrence' => 'Update recurring transaction', 'updated_recurrence' => 'Updated recurring transaction ":title"', 'recurrence_is_inactive' => 'This recurring transaction is not active and will not generate new transactions.', diff --git a/resources/views/v1/accounts/delete.twig b/resources/views/v1/accounts/delete.twig index 0466bab036..bd366b509b 100644 --- a/resources/views/v1/accounts/delete.twig +++ b/resources/views/v1/accounts/delete.twig @@ -35,7 +35,7 @@ {% endif %} {% if account.transactions.count > 0 and account.accountType.type == 'Asset account' %}
- {{ 'save_transactions_by_moving'|_ }} + {{ trans_choice('firefly.save_transactions_by_moving', account.transactions|length ) }}
diff --git a/resources/views/v1/accounts/index.twig b/resources/views/v1/accounts/index.twig index 553f4dee9e..dc458f52bb 100644 --- a/resources/views/v1/accounts/index.twig +++ b/resources/views/v1/accounts/index.twig @@ -43,7 +43,7 @@
- {{ trans('firefly.inactive_account_link', {count: inactiveCount}) }} + {{ trans_choice('firefly.inactive_account_link', inactiveCount) }} diff --git a/resources/views/v1/admin/telemetry/index.twig b/resources/views/v1/admin/telemetry/index.twig index f30739df4a..2f19a6f321 100644 --- a/resources/views/v1/admin/telemetry/index.twig +++ b/resources/views/v1/admin/telemetry/index.twig @@ -49,7 +49,7 @@
{% else %}- {{ trans('firefly.records_telemetry_present', {count: count}) }} + {{ trans_choice('firefly.records_telemetry_present', count) }}