mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
A set of small fixes, courtesy of scrutinizer-ci
This commit is contained in:
@@ -22,9 +22,9 @@ class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
|
||||
/** @var string|\Symfony\Component\Translation\TranslatorInterface */
|
||||
/** @var string */
|
||||
protected $monthAndDayFormat;
|
||||
/** @var string|\Symfony\Component\Translation\TranslatorInterface */
|
||||
/** @var string */
|
||||
protected $monthFormat;
|
||||
|
||||
/**
|
||||
@@ -40,8 +40,8 @@ class Controller extends BaseController
|
||||
if (Auth::check()) {
|
||||
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'));
|
||||
$lang = $pref->data;
|
||||
$this->monthFormat = trans('config.month');
|
||||
$this->monthAndDayFormat = trans('config.month_and_day');
|
||||
$this->monthFormat = (string)trans('config.month');
|
||||
$this->monthAndDayFormat = (string)trans('config.month_and_day');
|
||||
|
||||
App::setLocale($lang);
|
||||
Carbon::setLocale(substr($lang, 0, 2));
|
||||
|
||||
@@ -355,7 +355,10 @@ Breadcrumbs::register(
|
||||
$breadcrumbs->parent('reports.index');
|
||||
|
||||
$monthFormat = (string)trans('config.month_and_day');
|
||||
$title = (string)trans('firefly.report_' . $reportType, ['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]);
|
||||
$title = (string)trans(
|
||||
'firefly.report_' . $reportType,
|
||||
['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]
|
||||
);
|
||||
|
||||
$breadcrumbs->push($title, route('reports.report', [$reportType, $start->format('Ymd'), $end->format('Ymd'), $accountIds]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user