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

@@ -57,7 +57,7 @@ class NoCategoryController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.categories'));
app('view')->share('title', (string)trans('firefly.categories'));
app('view')->share('mainTitleIcon', 'fa-bar-chart');
$this->journalRepos = app(JournalRepositoryInterface::class);
$this->repository = app(CategoryRepositoryInterface::class);
@@ -120,7 +120,7 @@ class NoCategoryController extends Controller
$page = (int)$request->get('page');
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
Log::debug('Start of noCategory()');
$subTitle = trans('firefly.all_journals_without_category');
$subTitle = (string)trans('firefly.all_journals_without_category');
$first = $this->journalRepos->firstNull();
$start = null === $first ? new Carbon : $first->date;
$end = new Carbon;

View File

@@ -63,7 +63,7 @@ class ShowController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', trans('firefly.categories'));
app('view')->share('title', (string)trans('firefly.categories'));
app('view')->share('mainTitleIcon', 'fa-bar-chart');
$this->journalRepos = app(JournalRepositoryInterface::class);
$this->repository = app(CategoryRepositoryInterface::class);
@@ -130,7 +130,7 @@ class ShowController extends Controller
$periods = new Collection;
$moment = 'all';
$subTitle = trans('firefly.all_journals_for_category', ['name' => $category->name]);
$subTitle = (string)trans('firefly.all_journals_for_category', ['name' => $category->name]);
$first = $this->repository->firstUseDate($category);
/** @var Carbon $start */
$start = $first ?? new Carbon;