mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Refer to correct translations.
This commit is contained in:
parent
827b1c9cd8
commit
80dd62ef0a
@ -70,7 +70,13 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function defaultYear($report_type, Carbon $start, Carbon $end, Collection $accounts)
|
||||
{
|
||||
$subTitle = trans('firefly.reportForYear', ['year' => $start->year]);
|
||||
$subTitle = trans(
|
||||
'firefly.report_default_year',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat)
|
||||
]
|
||||
);
|
||||
$subTitleIcon = 'fa-bar-chart';
|
||||
$incomeTopLength = 8;
|
||||
$expenseTopLength = 8;
|
||||
@ -112,7 +118,13 @@ class ReportController extends Controller
|
||||
public function defaultMonth($report_type, Carbon $start, Carbon $end, Collection $accounts)
|
||||
{
|
||||
// some fields for translation:
|
||||
$subTitle = trans('firefly.reportForMonth', ['month' => $start->formatLocalized($this->monthFormat)]);
|
||||
$subTitle = trans(
|
||||
'firefly.report_default_month',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
||||
'end' => $end->formatLocalized($this->monthAndDayFormat)
|
||||
]
|
||||
);
|
||||
$subTitleIcon = 'fa-calendar';
|
||||
$incomeTopLength = 8;
|
||||
$expenseTopLength = 8;
|
||||
@ -153,6 +165,14 @@ class ReportController extends Controller
|
||||
|
||||
public function defaultMultiYear($report_type, $start, $end, $accounts)
|
||||
{
|
||||
$subTitle = trans(
|
||||
'firefly.report_default_multi-year',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat)
|
||||
]
|
||||
);
|
||||
$subTitleIcon = 'fa-calendar';
|
||||
|
||||
// list of users stuff:
|
||||
$budgets = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface')->getActiveBudgets();
|
||||
@ -166,7 +186,9 @@ class ReportController extends Controller
|
||||
}
|
||||
$accountIds = join(';', $accountIds);
|
||||
|
||||
return view('reports.default.multi-year', compact('budgets', 'accounts', 'categories','start','end','accountIds','report_type'));
|
||||
return view(
|
||||
'reports.default.multi-year', compact('budgets', 'accounts', 'categories', 'start', 'end', 'accountIds', 'report_type', 'subTitle', 'subTitleIcon')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -189,7 +211,7 @@ class ReportController extends Controller
|
||||
case 'default':
|
||||
// more than one year date difference means year report.
|
||||
if ($start->diffInMonths($end) > 12) {
|
||||
return view('error')->with('message', 'No report yet for this time period.');
|
||||
// return view('error')->with('message', 'No report yet for this time period.');
|
||||
return $this->defaultMultiYear($report_type, $start, $end, $accounts);
|
||||
}
|
||||
// more than two months date difference means year report.
|
||||
|
Loading…
Reference in New Issue
Block a user