From 9b3b2e72a2af2527ceb4fd137e19d26939ecc701 Mon Sep 17 00:00:00 2001 From: Kevin Luo Date: Wed, 23 Jul 2014 17:57:35 -0700 Subject: [PATCH] Add support for theme translations and LANGUAGE_DICT override --- lms/envs/aws.py | 1 + lms/startup.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 654567f7f5..e29d0ae205 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -207,6 +207,7 @@ TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) # Translation overrides LANGUAGES = ENV_TOKENS.get('LANGUAGES', LANGUAGES) +LANGUAGE_DICT = dict(LANGUAGES) LANGUAGE_CODE = ENV_TOKENS.get('LANGUAGE_CODE', LANGUAGE_CODE) USE_I18N = ENV_TOKENS.get('USE_I18N', USE_I18N) diff --git a/lms/startup.py b/lms/startup.py index e43e9fddba..8487c52186 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -76,6 +76,9 @@ def enable_theme(): (u'themes/{}'.format(settings.THEME_NAME), theme_root / 'static') ) + # Include theme locale path for django translations lookup + settings.LOCALE_PATHS = (theme_root / 'conf/locale',) + settings.LOCALE_PATHS + def enable_microsites(): """