Refactoring of code for #1159

This commit is contained in:
James Cole
2018-10-05 17:54:51 +02:00
parent 7ac439fd0e
commit 6f70791239
11 changed files with 543 additions and 336 deletions

View File

@@ -231,7 +231,7 @@ return [
'local_account' => 'Firefly III account',
'from_date' => 'Date from',
'to_date' => 'Date to',
'due_date' => 'Due date',
'payment_date' => 'Payment date',

View File

@@ -47,6 +47,9 @@ return [
'button_yodlee' => 'Import using Yodlee',
'button_quovo' => 'Import using Quovo',
'button_ynab' => 'Import from You Need A Budget',
'button_fints' => 'Import using FinTS',
// global config box (index)
'global_config_title' => 'Global import configuration',
'global_config_text' => 'In the future, this box will feature preferences that apply to ALL import providers above.',
@@ -201,118 +204,118 @@ return [
'spectre_extra_key_transactions_count' => 'Transaction count',
//job configuration for finTS
'fints_connection_failed' => 'An error occurred while trying to connecting to your bank. Please mak sure that all the data you entered is correct. Original error message: :originalError',
'button_fints' => 'FinTS',
'job_config_fints_url_help' => 'E.g. https://banking-dkb.s-fints-pt-dkb.de/fints30',
'job_config_fints_username_help' => 'For many banks this is your account number.',
'job_config_fints_port_help' => 'The default port is 443.',
'job_config_fints_account_help' => 'Choose the bank account for which you want to import transactions.',
'job_config_local_account_help' => 'Choose the Firefly III account corresponding to your bank account chosen above.',
'job_config_fints_url_help' => 'E.g. https://banking-dkb.s-fints-pt-dkb.de/fints30',
'job_config_fints_username_help' => 'For many banks this is your account number.',
'job_config_fints_port_help' => 'The default port is 443.',
'job_config_fints_account_help' => 'Choose the bank account for which you want to import transactions.',
'job_config_local_account_help' => 'Choose the Firefly III account corresponding to your bank account chosen above.',
// specifics:
'specific_ing_name' => 'ING NL',
'specific_ing_descr' => 'Create better descriptions in ING exports',
'specific_sns_name' => 'SNS / Volksbank NL',
'specific_sns_descr' => 'Trim quotes from SNS / Volksbank export files',
'specific_abn_name' => 'ABN AMRO NL',
'specific_abn_descr' => 'Fixes potential problems with ABN AMRO files',
'specific_rabo_name' => 'Rabobank NL',
'specific_rabo_descr' => 'Fixes potential problems with Rabobank files',
'specific_pres_name' => 'President\'s Choice Financial CA',
'specific_pres_descr' => 'Fixes potential problems with PC files',
'specific_ing_name' => 'ING NL',
'specific_ing_descr' => 'Create better descriptions in ING exports',
'specific_sns_name' => 'SNS / Volksbank NL',
'specific_sns_descr' => 'Trim quotes from SNS / Volksbank export files',
'specific_abn_name' => 'ABN AMRO NL',
'specific_abn_descr' => 'Fixes potential problems with ABN AMRO files',
'specific_rabo_name' => 'Rabobank NL',
'specific_rabo_descr' => 'Fixes potential problems with Rabobank files',
'specific_pres_name' => 'President\'s Choice Financial CA',
'specific_pres_descr' => 'Fixes potential problems with PC files',
// job configuration for file provider (stage: roles)
'job_config_roles_title' => 'Import setup (3/4) - Define each column\'s role',
'job_config_roles_text' => 'Each column in your CSV file contains certain data. Please indicate what kind of data the importer should expect. The option to "map" data means that you will link each entry found in the column to a value in your database. An often mapped column is the column that contains the IBAN of the opposing account. That can be easily matched to IBAN\'s present in your database already.',
'job_config_roles_submit' => 'Continue',
'job_config_roles_column_name' => 'Name of column',
'job_config_roles_column_example' => 'Column example data',
'job_config_roles_column_role' => 'Column data meaning',
'job_config_roles_do_map_value' => 'Map these values',
'job_config_roles_no_example' => 'No example data available',
'job_config_roles_fa_warning' => 'If you mark a column as containing an amount in a foreign currency, you must also set the column that contains which currency it is.',
'job_config_roles_rwarning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.',
'job_config_roles_colum_count' => 'Column',
'job_config_roles_title' => 'Import setup (3/4) - Define each column\'s role',
'job_config_roles_text' => 'Each column in your CSV file contains certain data. Please indicate what kind of data the importer should expect. The option to "map" data means that you will link each entry found in the column to a value in your database. An often mapped column is the column that contains the IBAN of the opposing account. That can be easily matched to IBAN\'s present in your database already.',
'job_config_roles_submit' => 'Continue',
'job_config_roles_column_name' => 'Name of column',
'job_config_roles_column_example' => 'Column example data',
'job_config_roles_column_role' => 'Column data meaning',
'job_config_roles_do_map_value' => 'Map these values',
'job_config_roles_no_example' => 'No example data available',
'job_config_roles_fa_warning' => 'If you mark a column as containing an amount in a foreign currency, you must also set the column that contains which currency it is.',
'job_config_roles_rwarning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.',
'job_config_roles_colum_count' => 'Column',
// job config for the file provider (stage: mapping):
'job_config_map_title' => 'Import setup (4/4) - Connect import data to Firefly III data',
'job_config_map_text' => 'In the following tables, the left value shows you information found in your uploaded file. It is your task to map this value, if possible, to a value already present in your database. Firefly will stick to this mapping. If there is no value to map to, or you do not wish to map the specific value, select nothing.',
'job_config_map_nothing' => 'There is no data present in your file that you can map to existing values. Please press "Start the import" to continue.',
'job_config_field_value' => 'Field value',
'job_config_field_mapped' => 'Mapped to',
'map_do_not_map' => '(do not map)',
'job_config_map_submit' => 'Start the import',
'job_config_map_title' => 'Import setup (4/4) - Connect import data to Firefly III data',
'job_config_map_text' => 'In the following tables, the left value shows you information found in your uploaded file. It is your task to map this value, if possible, to a value already present in your database. Firefly will stick to this mapping. If there is no value to map to, or you do not wish to map the specific value, select nothing.',
'job_config_map_nothing' => 'There is no data present in your file that you can map to existing values. Please press "Start the import" to continue.',
'job_config_field_value' => 'Field value',
'job_config_field_mapped' => 'Mapped to',
'map_do_not_map' => '(do not map)',
'job_config_map_submit' => 'Start the import',
// import status page:
'import_with_key' => 'Import with key \':key\'',
'status_wait_title' => 'Please hold...',
'status_wait_text' => 'This box will disappear in a moment.',
'status_running_title' => 'The import is running',
'status_job_running' => 'Please wait, running the import...',
'status_job_storing' => 'Please wait, storing data...',
'status_job_rules' => 'Please wait, running rules...',
'status_fatal_title' => 'Fatal error',
'status_fatal_text' => 'The import has suffered from an error it could not recover from. Apologies!',
'status_fatal_more' => 'This (possibly very cryptic) error message is complemented by log files, which you can find on your hard drive, or in the Docker container where you run Firefly III from.',
'status_finished_title' => 'Import finished',
'status_finished_text' => 'The import has finished.',
'finished_with_errors' => 'There were some errors during the import. Please review them carefully.',
'unknown_import_result' => 'Unknown import result',
'result_no_transactions' => 'No transactions have been imported. Perhaps they were all duplicates is simply no transactions where present to be imported. Perhaps the log files can tell you what happened. If you import data regularly, this is normal.',
'result_one_transaction' => 'Exactly one transaction has been imported. It is stored under tag <a href=":route" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a> where you can inspect it further.',
'result_many_transactions' => 'Firefly III has imported :count transactions. They are stored under tag <a href=":route" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a> where you can inspect them further.',
'import_with_key' => 'Import with key \':key\'',
'status_wait_title' => 'Please hold...',
'status_wait_text' => 'This box will disappear in a moment.',
'status_running_title' => 'The import is running',
'status_job_running' => 'Please wait, running the import...',
'status_job_storing' => 'Please wait, storing data...',
'status_job_rules' => 'Please wait, running rules...',
'status_fatal_title' => 'Fatal error',
'status_fatal_text' => 'The import has suffered from an error it could not recover from. Apologies!',
'status_fatal_more' => 'This (possibly very cryptic) error message is complemented by log files, which you can find on your hard drive, or in the Docker container where you run Firefly III from.',
'status_finished_title' => 'Import finished',
'status_finished_text' => 'The import has finished.',
'finished_with_errors' => 'There were some errors during the import. Please review them carefully.',
'unknown_import_result' => 'Unknown import result',
'result_no_transactions' => 'No transactions have been imported. Perhaps they were all duplicates is simply no transactions where present to be imported. Perhaps the log files can tell you what happened. If you import data regularly, this is normal.',
'result_one_transaction' => 'Exactly one transaction has been imported. It is stored under tag <a href=":route" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a> where you can inspect it further.',
'result_many_transactions' => 'Firefly III has imported :count transactions. They are stored under tag <a href=":route" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a> where you can inspect them further.',
// general errors and warnings:
'bad_job_status' => 'To access this page, your import job cannot have status ":status".',
'bad_job_status' => 'To access this page, your import job cannot have status ":status".',
// column roles for CSV import:
'column__ignore' => '(ignore this column)',
'column_account-iban' => 'Asset account (IBAN)',
'column_account-id' => 'Asset account ID (matching FF3)',
'column_account-name' => 'Asset account (name)',
'column_account-bic' => 'Asset account (BIC)',
'column_amount' => 'Amount',
'column_amount_foreign' => 'Amount (in foreign currency)',
'column_amount_debit' => 'Amount (debit column)',
'column_amount_credit' => 'Amount (credit column)',
'column_amount_negated' => 'Amount (negated column)',
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
'column_bill-id' => 'Bill ID (matching FF3)',
'column_bill-name' => 'Bill name',
'column_budget-id' => 'Budget ID (matching FF3)',
'column_budget-name' => 'Budget name',
'column_category-id' => 'Category ID (matching FF3)',
'column_category-name' => 'Category name',
'column_currency-code' => 'Currency code (ISO 4217)',
'column_foreign-currency-code' => 'Foreign currency code (ISO 4217)',
'column_currency-id' => 'Currency ID (matching FF3)',
'column_currency-name' => 'Currency name (matching FF3)',
'column_currency-symbol' => 'Currency symbol (matching FF3)',
'column_date-interest' => 'Interest calculation date',
'column_date-book' => 'Transaction booking date',
'column_date-process' => 'Transaction process date',
'column_date-transaction' => 'Date',
'column_date-due' => 'Transaction due date',
'column_date-payment' => 'Transaction payment date',
'column_date-invoice' => 'Transaction invoice date',
'column_description' => 'Description',
'column_opposing-iban' => 'Opposing account (IBAN)',
'column_opposing-bic' => 'Opposing account (BIC)',
'column_opposing-id' => 'Opposing account ID (matching FF3)',
'column_external-id' => 'External ID',
'column_opposing-name' => 'Opposing account (name)',
'column_rabo-debit-credit' => 'Rabobank specific debit/credit indicator',
'column_ing-debit-credit' => 'ING specific debit/credit indicator',
'column_sepa-ct-id' => 'SEPA end-to-end Identifier',
'column_sepa-ct-op' => 'SEPA Opposing Account Identifier',
'column_sepa-db' => 'SEPA Mandate Identifier',
'column_sepa-cc' => 'SEPA Clearing Code',
'column_sepa-ci' => 'SEPA Creditor Identifier',
'column_sepa-ep' => 'SEPA External Purpose',
'column_sepa-country' => 'SEPA Country Code',
'column_tags-comma' => 'Tags (comma separated)',
'column_tags-space' => 'Tags (space separated)',
'column_account-number' => 'Asset account (account number)',
'column_opposing-number' => 'Opposing account (account number)',
'column_note' => 'Note(s)',
'column_internal-reference' => 'Internal reference',
'column__ignore' => '(ignore this column)',
'column_account-iban' => 'Asset account (IBAN)',
'column_account-id' => 'Asset account ID (matching FF3)',
'column_account-name' => 'Asset account (name)',
'column_account-bic' => 'Asset account (BIC)',
'column_amount' => 'Amount',
'column_amount_foreign' => 'Amount (in foreign currency)',
'column_amount_debit' => 'Amount (debit column)',
'column_amount_credit' => 'Amount (credit column)',
'column_amount_negated' => 'Amount (negated column)',
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
'column_bill-id' => 'Bill ID (matching FF3)',
'column_bill-name' => 'Bill name',
'column_budget-id' => 'Budget ID (matching FF3)',
'column_budget-name' => 'Budget name',
'column_category-id' => 'Category ID (matching FF3)',
'column_category-name' => 'Category name',
'column_currency-code' => 'Currency code (ISO 4217)',
'column_foreign-currency-code' => 'Foreign currency code (ISO 4217)',
'column_currency-id' => 'Currency ID (matching FF3)',
'column_currency-name' => 'Currency name (matching FF3)',
'column_currency-symbol' => 'Currency symbol (matching FF3)',
'column_date-interest' => 'Interest calculation date',
'column_date-book' => 'Transaction booking date',
'column_date-process' => 'Transaction process date',
'column_date-transaction' => 'Date',
'column_date-due' => 'Transaction due date',
'column_date-payment' => 'Transaction payment date',
'column_date-invoice' => 'Transaction invoice date',
'column_description' => 'Description',
'column_opposing-iban' => 'Opposing account (IBAN)',
'column_opposing-bic' => 'Opposing account (BIC)',
'column_opposing-id' => 'Opposing account ID (matching FF3)',
'column_external-id' => 'External ID',
'column_opposing-name' => 'Opposing account (name)',
'column_rabo-debit-credit' => 'Rabobank specific debit/credit indicator',
'column_ing-debit-credit' => 'ING specific debit/credit indicator',
'column_sepa-ct-id' => 'SEPA end-to-end Identifier',
'column_sepa-ct-op' => 'SEPA Opposing Account Identifier',
'column_sepa-db' => 'SEPA Mandate Identifier',
'column_sepa-cc' => 'SEPA Clearing Code',
'column_sepa-ci' => 'SEPA Creditor Identifier',
'column_sepa-ep' => 'SEPA External Purpose',
'column_sepa-country' => 'SEPA Country Code',
'column_tags-comma' => 'Tags (comma separated)',
'column_tags-space' => 'Tags (space separated)',
'column_account-number' => 'Asset account (account number)',
'column_opposing-number' => 'Opposing account (account number)',
'column_note' => 'Note(s)',
'column_internal-reference' => 'Internal reference',
];