mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Definitely a bad day for commits. Thanks kmike for reviewing
This commit is contained in:
parent
f759491279
commit
44c1fe4840
1 changed files with 3 additions and 1 deletions
|
|
@ -60,12 +60,14 @@ def read_settings(filename):
|
||||||
locales = [locales]
|
locales = [locales]
|
||||||
|
|
||||||
# try to set the different locales, fallback on the default.
|
# try to set the different locales, fallback on the default.
|
||||||
for locale_ in context['LOCALE']:
|
for locale_ in locales:
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, locale_)
|
locale.setlocale(locale.LC_ALL, locale_)
|
||||||
break # break if it is successfull
|
break # break if it is successfull
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
warnings.warn("LOCALE option doesn't contain a correct value")
|
||||||
|
|
||||||
# set the locale
|
# set the locale
|
||||||
return context
|
return context
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue