mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 01:16:46 -06:00
Add locale to variables.
This commit is contained in:
parent
d49743031f
commit
1c07feb446
@ -136,7 +136,7 @@ class JavascriptController extends Controller
|
||||
if(null !== $account) {
|
||||
$currency = $repository->getAccountCurrency($account) ?? $currency;
|
||||
}
|
||||
|
||||
$locale = app('steam')->getLocale();
|
||||
$accounting = app('amount')->getJsConfig();
|
||||
$accounting['frac_digits'] = $currency->decimal_places;
|
||||
$pref = app('preferences')->get('language', config('firefly.default_language', 'en_US'));
|
||||
@ -146,13 +146,14 @@ class JavascriptController extends Controller
|
||||
$uid = substr(hash('sha256', sprintf('%s-%s-%s', (string) config('app.key'), auth()->user()->id, auth()->user()->email)), 0, 12);
|
||||
|
||||
$data = [
|
||||
'currencyCode' => $currency->code,
|
||||
'currencySymbol' => $currency->symbol,
|
||||
'accountingLocaleInfo' => $accounting,
|
||||
'language' => $lang,
|
||||
'dateRangeTitle' => $dateRange['title'],
|
||||
'dateRangeConfig' => $dateRange['configuration'],
|
||||
'uid' => $uid,
|
||||
'currencyCode' => $currency->code,
|
||||
'currencySymbol' => $currency->symbol,
|
||||
'accountingLocaleInfo' => $accounting,
|
||||
'language' => $lang,
|
||||
'dateRangeTitle' => $dateRange['title'],
|
||||
'locale' => $locale,
|
||||
'dateRangeConfig' => $dateRange['configuration'],
|
||||
'uid' => $uid,
|
||||
];
|
||||
$request->session()->keep(['two-factor-secret']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user