mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2068 from lucasplus/master
Set locale to LC_ALL in Quickstart script. Fixes #2043
This commit is contained in:
commit
213976ca11
1 changed files with 7 additions and 3 deletions
|
|
@ -21,8 +21,12 @@ import six
|
||||||
|
|
||||||
from pelican import __version__
|
from pelican import __version__
|
||||||
|
|
||||||
if (sys.version_info.major == 2):
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
locale.setlocale(locale.LC_ALL, '')
|
_DEFAULT_LANGUAGE = locale.getlocale()[0]
|
||||||
|
if _DEFAULT_LANGUAGE is None:
|
||||||
|
_DEFAULT_LANGUAGE = 'English'
|
||||||
|
else:
|
||||||
|
_DEFAULT_LANGUAGE = _DEFAULT_LANGUAGE.split('_')[0]
|
||||||
|
|
||||||
_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||||
"templates")
|
"templates")
|
||||||
|
|
@ -51,7 +55,7 @@ CONF = {
|
||||||
'github_pages_branch': _GITHUB_PAGES_BRANCHES['project'],
|
'github_pages_branch': _GITHUB_PAGES_BRANCHES['project'],
|
||||||
'default_pagination': 10,
|
'default_pagination': 10,
|
||||||
'siteurl': '',
|
'siteurl': '',
|
||||||
'lang': locale.getlocale()[0].split('_')[0],
|
'lang': _DEFAULT_LANGUAGE,
|
||||||
'timezone': _DEFAULT_TIMEZONE
|
'timezone': _DEFAULT_TIMEZONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue