mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2298 from manelclos/fix-2297
Don't fail on macOS: "unknown locale: UTF-8"
This commit is contained in:
commit
aaac64618a
1 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,11 @@ import six
|
||||||
from pelican import __version__
|
from pelican import __version__
|
||||||
|
|
||||||
locale.setlocale(locale.LC_ALL, '')
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
_DEFAULT_LANGUAGE = locale.getlocale()[0]
|
try:
|
||||||
|
_DEFAULT_LANGUAGE = locale.getlocale()[0]
|
||||||
|
except ValueError:
|
||||||
|
# Don't fail on macosx: "unknown locale: UTF-8"
|
||||||
|
_DEFAULT_LANGUAGE = None
|
||||||
if _DEFAULT_LANGUAGE is None:
|
if _DEFAULT_LANGUAGE is None:
|
||||||
_DEFAULT_LANGUAGE = 'English'
|
_DEFAULT_LANGUAGE = 'English'
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue