mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Show message when locale is invalid.
This commit is contained in:
@@ -98,7 +98,13 @@ class Range
|
|||||||
$locale = array_map('trim', $locale);
|
$locale = array_map('trim', $locale);
|
||||||
|
|
||||||
setlocale(LC_TIME, $locale);
|
setlocale(LC_TIME, $locale);
|
||||||
setlocale(LC_MONETARY, $locale);
|
$moneyResult = setlocale(LC_MONETARY, $locale);
|
||||||
|
|
||||||
|
// send error to view if could not set money format
|
||||||
|
if($moneyResult === false) {
|
||||||
|
View::share('invalidMonetaryLocale', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// save some formats:
|
// save some formats:
|
||||||
|
@@ -1,3 +1,13 @@
|
|||||||
|
{# LOCALE ERROR MESSAGE #}
|
||||||
|
{% if invalidMonetaryLocale %}
|
||||||
|
<div class="alert alert-info alert-dismissible" role="alert">
|
||||||
|
<button type="button" class="close" data-dismiss="alert">
|
||||||
|
<span>×</span><span class="sr-only">{{ 'close'|_ }}</span>
|
||||||
|
</button>
|
||||||
|
<strong>{{ 'invalid_server_configuration'|_ }}:</strong> <i class="fa fa-money"></i> {{ 'invalid_locale_settings'|_ }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{# SUCCESS MESSAGE (ALWAYS SINGULAR) #}
|
{# SUCCESS MESSAGE (ALWAYS SINGULAR) #}
|
||||||
{% if Session.has('success') %}
|
{% if Session.has('success') %}
|
||||||
<div class="alert alert-success alert-dismissible" role="alert">
|
<div class="alert alert-success alert-dismissible" role="alert">
|
||||||
@@ -80,3 +90,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user