From 6c6598dac5ea107b30098a0e7f9ce1fb16b15272 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 26 Jul 2015 07:39:04 +0200 Subject: [PATCH] Lots of new translations. --- app/Http/Controllers/PiggyBankController.php | 2 +- app/Http/Controllers/ProfileController.php | 26 +++++-- resources/lang/en/firefly.php | 80 +++++++++++++++----- resources/lang/nl/firefly.php | 49 +++++++++++- resources/twig/accounts/create.twig | 2 +- resources/twig/bills/create.twig | 2 +- resources/twig/bills/edit.twig | 2 +- resources/twig/budgets/edit.twig | 2 +- resources/twig/categories/create.twig | 2 +- resources/twig/currency/create.twig | 2 +- resources/twig/currency/edit.twig | 2 +- resources/twig/layout/default.twig | 2 +- resources/twig/piggy-banks/create.twig | 2 +- resources/twig/preferences/index.twig | 28 +++---- resources/twig/profile/change-password.twig | 16 ++-- resources/twig/profile/delete-account.twig | 15 ++-- resources/twig/profile/index.twig | 4 +- 17 files changed, 169 insertions(+), 69 deletions(-) diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index 049f4c83b3..fabe1d7553 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -66,7 +66,7 @@ class PiggyBankController extends Controller $periods = Config::get('firefly.piggy_bank_periods'); $accounts = ExpandedForm::makeSelectList($repository->getAccounts(['Default account', 'Asset account'])); - $subTitle = trans('firefly.create_new_piggybank'); + $subTitle = trans('firefly.new_piggy_bank'); $subTitleIcon = 'fa-plus'; // put previous url in session if not redirect from store (not "create another"). diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 8a1c02d227..6acda3d570 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -4,6 +4,7 @@ use Auth; use FireflyIII\Http\Requests; use FireflyIII\Http\Requests\DeleteAccountFormRequest; use FireflyIII\Http\Requests\ProfileFormRequest; +use FireflyIII\User; use Hash; use Session; @@ -20,7 +21,7 @@ class ProfileController extends Controller */ public function changePassword() { - return view('profile.change-password')->with('title', Auth::user()->email)->with('subTitle', 'Change your password')->with( + return view('profile.change-password')->with('title', Auth::user()->email)->with('subTitle', trans('firefly.change_your_password'))->with( 'mainTitleIcon', 'fa-user' ); } @@ -30,7 +31,7 @@ class ProfileController extends Controller */ public function deleteAccount() { - return view('profile.delete-account')->with('title', Auth::user()->email)->with('subTitle', 'Delete account')->with( + return view('profile.delete-account')->with('title', Auth::user()->email)->with('subTitle', trans('firefly.delete_account'))->with( 'mainTitleIcon', 'fa-user' ); } @@ -41,7 +42,7 @@ class ProfileController extends Controller */ public function index() { - return view('profile.index')->with('title', 'Profile')->with('subTitle', Auth::user()->email)->with('mainTitleIcon', 'fa-user'); + return view('profile.index')->with('title', trans('firefly.profile'))->with('subTitle', Auth::user()->email)->with('mainTitleIcon', 'fa-user'); } /** @@ -53,7 +54,7 @@ class ProfileController extends Controller { // old, new1, new2 if (!Hash::check($request->get('current_password'), Auth::user()->password)) { - Session::flash('error', 'Invalid current password!'); + Session::flash('error', trans('firefly.invalid_current_password')); return redirect(route('profile.change-password')); } @@ -68,7 +69,7 @@ class ProfileController extends Controller Auth::user()->password = $request->get('new_password'); Auth::user()->save(); - Session::flash('success', 'Password changed!'); + Session::flash('success', trans('firefly.password_changed')); return redirect(route('profile')); } @@ -83,7 +84,7 @@ class ProfileController extends Controller protected function validatePassword($old, $new1) { if ($new1 == $old) { - return 'The idea is to change your password.'; + return trans('firefly.should_change'); } return true; @@ -100,17 +101,28 @@ class ProfileController extends Controller { // old, new1, new2 if (!Hash::check($request->get('password'), Auth::user()->password)) { - Session::flash('error', 'Invalid password!'); + Session::flash('error', trans('firefly.invalid_password')); return redirect(route('profile.delete-account')); } // DELETE! + $email = Auth::user()->email; Auth::user()->delete(); Session::flush(); Session::flash('gaEventCategory', 'user'); Session::flash('gaEventAction', 'delete-account'); + // create a new user with the same email address so re-registration is blocked. + User::create( + [ + 'email' => $email, + 'password' => 'deleted', + 'blocked' => 1, + 'blocked_code' => 'deleted' + ] + ); + return redirect(route('index')); } diff --git a/resources/lang/en/firefly.php b/resources/lang/en/firefly.php index 62cc13085e..d5870f50a7 100644 --- a/resources/lang/en/firefly.php +++ b/resources/lang/en/firefly.php @@ -18,9 +18,46 @@ return [ 'showEverything' => 'Show everything', 'never' => 'Never', 'search_results_for' => 'Search results for ":query"', - 'bounce_error' => 'The message sent to :email bounced, so no access for you.', + 'bounced_error' => 'The message sent to :email bounced, so no access for you.', + 'deleted_error' => 'These credentials do not match our records.', 'removed_amount' => 'Removed :amount', 'added_amount' => 'Added :amount', + 'asset_account_role_help' => 'Any extra options resulting from your choice can be set later.', + + // preferences + 'pref_home_screen_accounts' => 'Home screen accounts', + 'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?', + 'pref_budget_settings' => 'Budget settings', + 'pref_budget_settings_help' => 'What\'s the maximum amount of money a budget envelope may contain?', + 'pref_view_range' => 'View range', + 'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?', + 'pref_1D' => 'One day', + 'pref_1W' => 'One week', + 'pref_1M' => 'One month', + 'pref_3M' => 'Three months (quarter)', + 'pref_6M' => 'Six months', + 'pref_languages' => 'Languages', + 'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?', + 'pref_save_settings' => 'Save settings', + + // profile: + 'change_your_password' => 'Change your password', + 'delete_account' => 'Delete account', + 'current_password' => 'Current password', + 'new_password' => 'New password', + 'new_password_again' => 'New password (again)', + 'delete_your_account' => 'Delete your account', + 'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, anything you might have saved' . + ' into Firefly III. It\'ll be GONE.', + 'delete_your_account_password' => 'Enter your password to continue.', + 'password' => 'Password', + 'are_you_sure' => 'Are you sure? You cannot undo this.', + 'delete_account_button' => 'DELETE your account', + 'invalid_current_password' => 'Invalid current password!', + 'password_changed' => 'Password changed!', + 'should_change' => 'The idea is to change your password.', + 'invalid_password' => 'Invalid password!', + // attachments 'nr_of_attachments' => 'One attachment|:count attachments', @@ -52,22 +89,23 @@ return [ 'csv_define_column_roles' => 'Define column roles', 'csv_map_values' => 'Map found values to existing values', 'csv_download_config' => 'Download CSV configuration file.', - 'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by' - . ' the folks at Atlassian. Simply upload your CSV file and follow the instructions.' - . ' If you would like to learn more, please click on the button at the top of this page.', + 'csv_index_text' => 'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV' . + ' importer made by the folks at Atlassian. Simply upload your CSV' . + ' file and follow the instructions. If you would like to learn more, please click on the button at the top of this page.', 'csv_index_beta_warning' => 'This tool is very much in beta. Please proceed with caution', 'csv_header_help' => 'Check this box when your CSV file\'s first row consists of column names, not actual data', - 'csv_date_help' => 'Date time format in your CSV. Follow the format like this' - . ' page indicates. The default value will parse dates that look like this: ' . date('Ymd'), + 'csv_date_help' => 'Date time format in your CSV. Follow the format like this page ' . + 'indicates. The default value will parse dates that look like this: ' . date('Ymd'), 'csv_csv_file_help' => 'Select the CSV file here. You can only upload one file at a time', 'csv_csv_config_file_help' => 'Select your CSV import configuration here. If you do not know what this is, ignore it. It will be explained later.', 'csv_upload_button' => 'Start importing CSV', 'csv_column_roles_title' => 'Define column roles', - 'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. Please check out the example ' - . 'data if you\'re not sure yourself. Click on the question mark (top right of the page) to learn what' - . ' each column means. If you want to map imported data onto existing data in Firefly, use the checkbox. ' - . 'The next step will show you what this button does.', + 'csv_column_roles_text' => 'Firefly does not know what each column means. You need to indicate what every column is. ' . + 'Please check out the example data if you\'re not sure yourself. Click on the question mark ' . + '(top right of the page) to learn what each column means. If you want to map imported data ' . + 'onto existing data in Firefly, use the checkbox. The next step will show you what this button does.', 'csv_column_roles_table' => 'Column roles', 'csv_column' => 'CSV column', 'cvs_column_name' => 'CSV column name', @@ -77,15 +115,15 @@ return [ 'csv_continue' => 'Continue to the next step', 'csv_go_back' => 'Go back to the previous step', 'csv_map_title' => 'Map found values to existing values', - 'csv_map_text' => 'This page allows you to map the values from the CSV file to existing entries in your database. This ensures that accounts and other' - . ' things won\'t be created twice.', + 'csv_map_text' => 'This page allows you to map the values from the CSV file to existing entries in your ' . + 'database. This ensures that accounts and other things won\'t be created twice.', 'cvs_field_value' => 'Field value from CSV', 'csv_field_mapped_to' => 'Must be mapped to...', 'csv_do_not_map' => 'Do not map this value', 'csv_download_config_title' => 'Download CSV configuration', 'csv_download_config_text' => 'Everything you\'ve just set up can be downloaded as a configuration file. Click the button to do so.', - 'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all over again.' - . ' But, if the import succeeds, it will be easier to upload similar CSV files.', + 'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all ' . + 'over again. But, if the import succeeds, it will be easier to upload similar CSV files.', 'csv_do_download_config' => 'Download configuration file.', 'csv_empty_description' => '(empty description)', 'csv_upload_form' => 'CSV upload form', @@ -131,7 +169,8 @@ return [ 'csv_column_tags-space' => 'Tags (space separated)', 'csv_specifix_RabobankDescription' => 'Select this when you\'re importing Rabobank CSV export files.', 'csv_specifix_Dummy' => 'Checking this has no effect whatsoever.', - 'csv_import_account_help' => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', + 'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which' + . ' account the transactions in the CSV belong to.', // create new stuff: @@ -144,9 +183,12 @@ return [ 'create_new_piggy_bank' => 'Create new piggy bank', 'create_new_bill' => 'Create new bill', + // currencies: 'create_currency' => 'Create a new currency', 'edit_currency' => 'Edit currency ":name"', + 'store_currency' => 'Store new currency', + 'update_currency' => 'Update currency', // new user: 'submit' => 'Submit', @@ -174,10 +216,13 @@ return [ 'delete_budget' => 'Delete budget ":name"', 'edit_budget' => 'Edit budget ":name"', 'update_amount' => 'Update amount', + 'update_budget' => 'Update budget', // bills: 'delete_bill' => 'Delete bill ":name"', 'edit_bill' => 'Edit bill ":name"', + 'update_bill' => 'Update bill', + 'store_new_bill' => 'Store new bill', // accounts: 'details_for_asset' => 'Details for asset account ":name"', @@ -229,6 +274,7 @@ return [ 'no_category' => '(no category)', 'category' => 'Category', 'delete_category' => 'Delete category ":name"', + 'store_category' => 'Store new category', // transactions: 'update_withdrawal' => 'Update withdrawal', @@ -369,7 +415,7 @@ return [ // piggy banks: 'piggy_bank' => 'Piggy bank', 'new_piggy_bank' => 'Create new piggy bank', - 'create_new_piggybank' => 'Create new piggy bank', + 'store_piggy_bank' => 'Store new piggy bank', 'account_status' => 'Account status', 'left_for_piggy_banks' => 'Left for piggy banks', 'sum_of_piggy_banks' => 'Sum of piggy banks', diff --git a/resources/lang/nl/firefly.php b/resources/lang/nl/firefly.php index cc9346d7e8..55e446c852 100644 --- a/resources/lang/nl/firefly.php +++ b/resources/lang/nl/firefly.php @@ -18,9 +18,45 @@ return [ 'showEverything' => 'Laat alles zien', 'never' => 'Nooit', 'search_results_for' => 'Zoekresultaten voor ":query"', - 'bounce_error' => 'Het emailtje naar :email kwam nooit aan.', + 'bounced_error' => 'Het emailtje naar :email kwam nooit aan.', + 'deleted_error' => 'These credentials do not match our records.', 'removed_amount' => ':amount weggehaald', 'added_amount' => ':amount toegevoegd', + 'asset_account_role_help' => 'Voorkeuren die voortkomen uit je keuze hier kan je later aangeven.', + + // preferences + 'pref_home_screen_accounts' => 'Voorpaginarekeningen', + 'pref_home_screen_accounts_help' => 'Welke betaalrekeningen wil je op de voorpagina zien?', + 'pref_budget_settings' => 'Budgetinstellingen', + 'pref_budget_settings_help' => 'Wat is het maximale bedrag dat je voor een budget kan instellen?', + 'pref_view_range' => 'Bereik', + 'pref_view_range_help' => 'Sommige pagina\'s springen naar een standaard bereik. Welk bereik heeft jouw voorkeur?', + 'pref_1D' => 'Eén dag', + 'pref_1W' => 'Eén week', + 'pref_1M' => 'Eén maand', + 'pref_3M' => 'Drie maanden (kwartaal)', + 'pref_6M' => 'Zes maanden', + 'pref_languages' => 'Talen', + 'pref_languages_help' => 'Firefly III ondersteunt meerdere talen. Welke heeft jouw voorkeur?', + 'pref_save_settings' => 'Instellingen opslaan', + + // profile: + 'change_your_password' => 'Verander je wachtwoord', + 'delete_account' => 'Verwijder je account', + 'current_password' => 'Huidige wachtwoord', + 'new_password' => 'Nieuw wachtwoord', + 'new_password_again' => 'Nieuw wachtwoord (bevestiging)', + 'delete_your_account' => 'Verwijder je account', + 'delete_your_account_help' => 'Als je je account verwijderd worden ook al je rekeningen, transacties en alle andere zaken verwijderd.' . + ' Alles is dan WEG.', + 'delete_your_account_password' => 'Voer je wachtwoord in om door te gaan.', + 'password' => 'Wachtwoord', + 'are_you_sure' => 'Zeker weten? Je kan niet meer terug!', + 'delete_account_button' => 'VERWIJDER je account', + 'invalid_current_password' => 'Huidige wachtwoord is niet geldig!', + 'password_changed' => 'Je wachtwoord is veranderd!', + 'should_change' => 'Vul ook echt een ander wachtwoord in.', + 'invalid_password' => 'Ongeldig wachtwoord!', // attach 'nr_of_attachments' => 'Eén bijlage|:count bijlagen', @@ -137,8 +173,7 @@ return [ 'csv_column_tags-space' => 'Tags (spatiegescheiden)', 'csv_specifix_RabobankDescription' => 'Vink dit aan als je Rabobank bestanden importeert.', 'csv_specifix_Dummy' => 'Dit vinkje doet niks (dummy).', - 'csv_import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which' - . ' account the transactions in the CSV belong to.', + 'csv_import_account_help' => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', // create new stuff: 'create_new_withdrawal' => 'Nieuwe uitgave', @@ -153,6 +188,8 @@ return [ // currencies: 'create_currency' => 'Voeg nieuwe valuta toe', 'edit_currency' => 'Wijzig valuta ":name"', + 'store_currency' => 'Sla nieuwe valuta op', + 'update_currency' => 'Wijzig valuta', // new user: 'submit' => 'Invoeren', @@ -180,10 +217,13 @@ return [ 'delete_budget' => 'Verwijder budget ":name"', 'edit_budget' => 'Wijzig budget ":name"', 'update_amount' => 'Bedrag bijwerken', + 'update_budget' => 'Budget bijwerken', // bills: 'delete_bill' => 'Verwijder contract ":name"', + 'update_bill' => 'Wijzig contract', 'edit_bill' => 'Wijzig contract ":name"', + 'store_new_bill' => 'Sla nieuw contract op', // accounts: 'details_for_asset' => 'Overzicht voor betaalrekening ":name"', @@ -244,6 +284,7 @@ return [ 'no_category' => '(geen categorie)', 'category' => 'Categorie', 'delete_category' => 'Verwijder categorie ":name"', + 'store_category' => 'Sla nieuwe categorie op', // transactions: 'update_withdrawal' => 'Wijzig uitgave', @@ -384,7 +425,7 @@ return [ // piggy banks: 'piggy_bank' => 'Spaarpotje', 'new_piggy_bank' => 'Nieuw spaarpotje', - 'create_new_piggybank' => 'Nieuw spaarpotje', + 'store_piggy_bank' => 'Sla spaarpotje op', 'account_status' => 'Rekeningoverzicht', 'left_for_piggy_banks' => 'Over voor spaarpotjes', 'sum_of_piggy_banks' => 'Som van spaarpotjes', diff --git a/resources/twig/accounts/create.twig b/resources/twig/accounts/create.twig index c52b5321ea..a801fede4a 100644 --- a/resources/twig/accounts/create.twig +++ b/resources/twig/accounts/create.twig @@ -32,7 +32,7 @@ {{ ExpandedForm.text('iban') }} {{ ExpandedForm.balance('openingBalance') }} {{ ExpandedForm.date('openingBalanceDate', phpdate('Y-m-d')) }} - {{ ExpandedForm.select('accountRole', Config.get('firefly.accountRoles'),null,{'helpText' : 'Any extra options resulting from your choice can be set later.'}) }} + {{ ExpandedForm.select('accountRole', Config.get('firefly.accountRoles'),null,{'helpText' : 'asset_account_role_help'|_}) }} {{ ExpandedForm.balance('virtualBalance') }} diff --git a/resources/twig/bills/create.twig b/resources/twig/bills/create.twig index b9c8ba62dd..fd888c257d 100644 --- a/resources/twig/bills/create.twig +++ b/resources/twig/bills/create.twig @@ -47,7 +47,7 @@ diff --git a/resources/twig/bills/edit.twig b/resources/twig/bills/edit.twig index eae7fd2d88..94c4add246 100644 --- a/resources/twig/bills/edit.twig +++ b/resources/twig/bills/edit.twig @@ -49,7 +49,7 @@ diff --git a/resources/twig/budgets/edit.twig b/resources/twig/budgets/edit.twig index 39611eb75d..0bf5ec3daa 100644 --- a/resources/twig/budgets/edit.twig +++ b/resources/twig/budgets/edit.twig @@ -30,7 +30,7 @@ {{ ExpandedForm.optionsList('update','budget') }} diff --git a/resources/twig/categories/create.twig b/resources/twig/categories/create.twig index c12f377cd5..b4dffb55c5 100644 --- a/resources/twig/categories/create.twig +++ b/resources/twig/categories/create.twig @@ -31,7 +31,7 @@ diff --git a/resources/twig/currency/create.twig b/resources/twig/currency/create.twig index 956febad3c..0b3c512f81 100644 --- a/resources/twig/currency/create.twig +++ b/resources/twig/currency/create.twig @@ -33,7 +33,7 @@ diff --git a/resources/twig/currency/edit.twig b/resources/twig/currency/edit.twig index 5444860dc2..a39ab1b0e4 100644 --- a/resources/twig/currency/edit.twig +++ b/resources/twig/currency/edit.twig @@ -34,7 +34,7 @@ diff --git a/resources/twig/layout/default.twig b/resources/twig/layout/default.twig index 27fde5aa7c..a8abecfe1b 100644 --- a/resources/twig/layout/default.twig +++ b/resources/twig/layout/default.twig @@ -143,7 +143,7 @@ diff --git a/resources/twig/piggy-banks/create.twig b/resources/twig/piggy-banks/create.twig index 9e7027d7f6..65b0f361db 100644 --- a/resources/twig/piggy-banks/create.twig +++ b/resources/twig/piggy-banks/create.twig @@ -43,7 +43,7 @@ diff --git a/resources/twig/preferences/index.twig b/resources/twig/preferences/index.twig index 66f45235a3..366d64be45 100644 --- a/resources/twig/preferences/index.twig +++ b/resources/twig/preferences/index.twig @@ -11,10 +11,10 @@
-

Home screen accounts

+

{{ 'pref_home_screen_accounts'|_ }}

-

Which accounts should be displayed on the home page?

+

{{ 'pref_home_screen_accounts_help'|_ }}

{% for account in accounts %}
@@ -34,11 +34,11 @@
-

Budget settings

+

{{ 'pref_budget_settings'|_ }}

- What's the maximum amount of money a budget envelope may contain? + {{ 'pref_budget_settings_help'|_ }}

{{ ExpandedForm.amount('budgetMaximum',budgetMaximum,{'label' : 'Budget maximum'}) }}
@@ -48,43 +48,43 @@
-

View range

+

{{ 'pref_view_range'|_ }}

-

Some charts are automatically grouped in periods. What period would you prefer?

+

{{ 'pref_view_range_help'|_ }}

@@ -93,10 +93,10 @@
-

Languages

+

{{ 'pref_languages'|_ }}

-

Firefly III supports several languages. Which one do you prefer?

+

{{ 'pref_languages_help'|_ }}

{% for key, lang in Config.get('firefly.lang') %}