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

@@ -58,7 +58,7 @@ class AmountController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);

View File

@@ -49,7 +49,7 @@ class CreateController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);

View File

@@ -49,7 +49,7 @@ class DeleteController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);
@@ -66,7 +66,7 @@ class DeleteController extends Controller
*/
public function delete(Budget $budget)
{
$subTitle = trans('firefly.delete_budget', ['name' => $budget->name]);
$subTitle = (string)trans('firefly.delete_budget', ['name' => $budget->name]);
// put previous url in session
$this->rememberPreviousUri('budgets.delete.uri');

View File

@@ -51,7 +51,7 @@ class EditController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);
@@ -68,7 +68,7 @@ class EditController extends Controller
*/
public function edit(Request $request, Budget $budget)
{
$subTitle = trans('firefly.edit_budget', ['name' => $budget->name]);
$subTitle = (string)trans('firefly.edit_budget', ['name' => $budget->name]);
// code to handle active-checkboxes
$hasOldInput = null !== $request->old('_token');

View File

@@ -55,7 +55,7 @@ class IndexController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);

View File

@@ -58,7 +58,7 @@ class ShowController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.budgets'));
app('view')->share('title', (string)trans('firefly.budgets'));
app('view')->share('mainTitleIcon', 'fa-tasks');
$this->repository = app(BudgetRepositoryInterface::class);
@@ -106,7 +106,7 @@ class ShowController extends Controller
*/
public function noBudgetAll(Request $request, JournalRepositoryInterface $repository)
{
$subTitle = trans('firefly.all_journals_without_budget');
$subTitle = (string)trans('firefly.all_journals_without_budget');
$first = $repository->firstNull();
$start = null === $first ? new Carbon : $first->date;
$end = new Carbon;
@@ -148,7 +148,7 @@ class ShowController extends Controller
$transactions = $collector->getPaginatedJournals();
$transactions->setPath(route('budgets.show', [$budget->id]));
$subTitle = trans('firefly.all_journals_for_budget', ['name' => $budget->name]);
$subTitle = (string)trans('firefly.all_journals_for_budget', ['name' => $budget->name]);
return view('budgets.show', compact('limits', 'budget', 'repetition', 'transactions', 'subTitle'));
}