Translations and fixes.

This commit is contained in:
James Cole 2016-06-11 06:31:40 +02:00
parent 5a79bc0a99
commit 13b92c47d9
4 changed files with 68 additions and 42 deletions

View File

@ -51,22 +51,16 @@ class CsvImporter implements ImporterInterface
]; ];
$data = [ $data = [
'accounts' => ExpandedForm::makeSelectList($accounts), 'accounts' => ExpandedForm::makeSelectList($accounts),
'specifix' => [], 'specifix' => [],
'delimiters' => $delimiters, 'delimiters' => $delimiters,
'upload_path' => storage_path('upload'),
'is_upload_possible' => is_writable(storage_path('upload')),
]; ];
return $data; return $data;
} }
/**
* @param ImportJob $job
*/
public function setJob(ImportJob $job)
{
$this->job = $job;
}
/** /**
* Returns a Map thing used to allow the user to * Returns a Map thing used to allow the user to
* define roles for each entry. * define roles for each entry.
@ -78,4 +72,12 @@ class CsvImporter implements ImporterInterface
return 'do not work'; return 'do not work';
exit; exit;
} }
/**
* @param ImportJob $job
*/
public function setJob(ImportJob $job)
{
$this->job = $job;
}
} }

View File

@ -327,11 +327,11 @@ return [
'title_transfers' => 'Transfers', 'title_transfers' => 'Transfers',
// import routine // import routine
'import_data' => 'Import data', 'import_data' => 'Import data',
'import' => 'Import', 'import' => 'Import',
'import_intro_text' => 'Some intro here', 'import_intro_text' => 'Some intro here',
'import_file_help' => 'Select your file', 'import_file_help' => 'Select your file',
// create new stuff: // create new stuff:
'create_new_withdrawal' => 'Create new withdrawal', 'create_new_withdrawal' => 'Create new withdrawal',
@ -727,29 +727,39 @@ return [
'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.',
'store_splitted_withdrawal' => 'Store splitted withdrawal', 'store_splitted_withdrawal' => 'Store splitted withdrawal',
'update_splitted_withdrawal' => 'Update splitted withdrawal', 'update_splitted_withdrawal' => 'Update splitted withdrawal',
'split_title_deposit' => 'Split your new deposit',
'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.',
'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.',
'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.',
'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.',
'store_splitted_deposit' => 'Store splitted deposit',
'split_title_transfer' => 'Split your new transfer',
'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.',
'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.',
'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.',
'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.',
'store_splitted_transfer' => 'Store splitted transfer',
'add_another_split' => 'Add another split',
'split-transactions' => 'Split transactions',
'split-new-transaction' => 'Split a new transaction',
'do_split' => 'Do a split',
'split_this_withdrawal' => 'Split this withdrawal',
'split_this_deposit' => 'Split this deposit',
'split_this_transfer' => 'Split this transfer',
'split_title_deposit' => 'Split your new deposit', // import
'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', 'import_file_type_csv' => 'CSV (comma separated values)',
'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', 'import_file_type_help' => 'Select the type of file you will upload',
'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', 'import_start' => 'Start the import',
'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', 'import_csv_configure_title' => 'Configure your import',
'store_splitted_deposit' => 'Store splitted deposit', 'import_csv_configure_intro' => 'There are some options for your CSV import.',
'import_csv_configure_form' => 'Form',
'split_title_transfer' => 'Split your new transfer', 'csv_header_help' => 'Check this if the first row of your CSV file are the column titles',
'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', 'csv_date_help' => 'Date time format in your CSV. Follow the format like <a href="https://secure.php.net/manual/en/datetime.createfromformat.php#refsect1-datetime.createfromformat-parameters">this page</a> indicates. The default value will parse dates that look like this: :dateExample.',
'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', 'csv_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.',
'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', '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.',
'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', '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.',
'store_splitted_transfer' => 'Store splitted transfer', 'csv_upload_not_writeable' => 'The grey box contains a file path. It should be writeable. Please make sure it is.',
'add_another_split' => 'Add another split',
'split-transactions' => 'Split transactions',
'split-new-transaction' => 'Split a new transaction',
'do_split' => 'Do a split',
'split_this_withdrawal' => 'Split this withdrawal',
'split_this_deposit' => 'Split this deposit',
'split_this_transfer' => 'Split this transfer',
]; ];

View File

@ -130,4 +130,17 @@ return [
'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.', 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.',
'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.', 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.',
'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.', 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.',
// import
'import_file' => 'Import file',
'import_file_type' => 'Import file type',
'csv_comma' => 'A comma (,)',
'csv_semicolon' => 'A semicolon (;)',
'csv_tab' => 'A tab (invisible)',
'csv_delimiter' => 'CSV field delimiter',
'csv_import_account' => 'Default import account',
'csv_config' => 'CSV import configuration',
]; ];

View File

@ -14,7 +14,7 @@
</div> </div>
<div class="box-body"> <div class="box-body">
<p> <p>
{{ 'import_csv_configure_intro' }} {{ 'import_csv_configure_intro'|_ }}
</p> </p>
</div> </div>
</div> </div>
@ -45,14 +45,14 @@
{% if not uploadPossible %} {% if not data.is_upload_possible %}
<div class="form-group" id="csv_holder"> <div class="form-group" id="csv_holder">
<div class="col-sm-4"> <div class="col-sm-4">
&nbsp; &nbsp;
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<pre>{{ path }}</pre> <pre>{{ data.upload_path }}</pre>
<p class="text-danger"> <p class="text-danger">
{{ 'csv_upload_not_writeable'|_ }} {{ 'csv_upload_not_writeable'|_ }}
</p> </p>
@ -64,7 +64,7 @@
</div> </div>
</div> </div>
</div> </div>
{% if data.is_upload_possible %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="box"> <div class="box">
@ -76,6 +76,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endif %}
</form> </form>