In case of no matching translations, target_lang was "None" which
blew up things. Fall back to "en" in case we don't find a
corresponding translation.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
# of accepted locales, and serve the best available locale rather than
# the most preferred, or fall back to 'en' immediately.
target_lang = request.accept_languages.best_match(
- mg_globals.available_locales)
+ mg_globals.available_locales) or 'en'
return locale_to_lower_upper(target_lang)
SETUP_GETTEXTS = {}