Cast all translations to strings.

This commit is contained in:
James Cole
2018-07-15 09:38:49 +02:00
parent 369839e012
commit 7b41c5b301
99 changed files with 335 additions and 336 deletions

View File

@@ -500,7 +500,7 @@ class AccountController extends Controller
$return[$budgetId] = $grouped[$budgetId][0]['name'];
}
}
$return[0] = trans('firefly.no_budget');
$return[0] = (string)trans('firefly.no_budget');
return $return;
}
@@ -524,7 +524,7 @@ class AccountController extends Controller
$return[$categoryId] = $grouped[$categoryId][0]['name'];
}
}
$return[0] = trans('firefly.noCategory');
$return[0] = (string)trans('firefly.noCategory');
return $return;
}

View File

@@ -106,9 +106,9 @@ class BillController extends Controller
}
);
$chartData = [
['type' => 'bar', 'label' => trans('firefly.min-amount'), 'entries' => []],
['type' => 'bar', 'label' => trans('firefly.max-amount'), 'entries' => []],
['type' => 'line', 'label' => trans('firefly.journal-amount'), 'entries' => []],
['type' => 'bar', 'label' => (string)trans('firefly.min-amount'), 'entries' => []],
['type' => 'bar', 'label' => (string)trans('firefly.max-amount'), 'entries' => []],
['type' => 'line', 'label' => (string)trans('firefly.journal-amount'), 'entries' => []],
];
/** @var Transaction $entry */

View File

@@ -510,7 +510,7 @@ class BudgetController extends Controller
$return[$categoryId] = $grouped[$categoryId][0]['name'];
}
}
$return[0] = trans('firefly.noCategory');
$return[0] = (string)trans('firefly.noCategory');
return $return;
}

View File

@@ -111,13 +111,13 @@ class ReportController extends Controller
$source = $this->getChartData($accounts, $start, $end);
$chartData = [
[
'label' => trans('firefly.income'),
'label' => (string)trans('firefly.income'),
'type' => 'bar',
'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
'entries' => [],
],
[
'label' => trans('firefly.expenses'),
'label' => (string)trans('firefly.expenses'),
'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
'entries' => [],
@@ -199,7 +199,7 @@ class ReportController extends Controller
],
],
[
'label' => trans('firefly.expenses'),
'label' => (string)trans('firefly.expenses'),
'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
'entries' => [