Skip to content
Permalink
Browse files

Add more informative warnings about locale errors

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 15, 2016
1 parent 451c51f commit 4cbeaa185521297c97ea02cba1baee291df822ef
Showing with 7 additions and 0 deletions.
  1. +4 −0 nikola/conf.py.in
  2. +3 −0 nikola/nikola.py
@@ -170,6 +170,10 @@ TIMEZONE = ${TIMEZONE}
# LOCALE_DEFAULT = locale to use for languages not mentioned in LOCALES; if
# not set the default Nikola mapping is used.

# LOCALES = {}
# LOCALE_FALLBACK = None
# LOCALE_DEFAULT = None

# One or more folders containing files to be copied as-is into the output.
# The format is a dictionary of {source: relative destination}.
# Default is:
@@ -2375,6 +2375,9 @@ def sanitized_locales(locale_fallback, locale_default, locales, translations):
locale_n = locale_fallback
msg = "Could not guess locale for language {0}, using locale {1}"
utils.LOGGER.warn(msg.format(lang, locale_n))
utils.LOGGER.warn("Please fix your OS locale configuration or use the LOCALES option in conf.py to specify your preferred locale.")
if sys.platform != 'win32':
utils.LOGGER.warn("Make sure to use an UTF-8 locale to ensure Unicode support.")
locales[lang] = locale_n

return locale_fallback, locale_default, locales

0 comments on commit 4cbeaa1

Please sign in to comment.
You can’t perform that action at this time.