More translations.

This commit is contained in:
James Cole
2015-07-06 10:39:44 +02:00
parent 5b50abb2c7
commit 39af9e4414
7 changed files with 126 additions and 21 deletions

View File

@@ -30,7 +30,7 @@ class Importer
/** @var array */
protected $errors;
/** @var int */
protected $imported;
protected $imported = 0;
/** @var array */
protected $map;
/** @var array */
@@ -131,12 +131,14 @@ class Importer
$journal = null;
if ($result === true) {
$journal = $this->createTransactionJournal($data);
} else {
return $result;
}
if ($journal instanceof TransactionJournal) {
return true;
}
return 'Not a journal.';
return $journal;
}
@@ -278,6 +280,9 @@ class Importer
if ($errors->count() == 0) {
$journal->completed = 1;
$journal->save();
} else {
$text = join(',', $errors->all());
return $text;
}
// add budget:

View File

@@ -50,10 +50,9 @@ class CsvController extends Controller
/**
* Define column roles and mapping.
*
*
* STEP THREE
*
* @return View
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
*/
public function columnRoles()
{
@@ -82,7 +81,7 @@ class CsvController extends Controller
}
foreach (Config::get('csv.roles') as $name => $role) {
$availableRoles[$name] = $role['name'];
$availableRoles[$name] = trans('firefly.csv_column_' . $name);//$role['name'];
}
ksort($availableRoles);