Skip to content
Browse files
Add more informative warnings about locale errors
Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Jul 15, 2016
1 parent 451c51f commit 4cbeaa185521297c97ea02cba1baee291df822ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
@@ -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 = {}

# 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 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.