Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,12 @@
# "COMPREHENSIVE_THEME_LOCALE_PATHS" : ["/edx/src/edx-themes/conf/locale"].
COMPREHENSIVE_THEME_LOCALE_PATHS = []

# .. setting_name: PREPEND_LOCALE_PATHS
# .. setting_default: []
# .. setting_description: A list of the paths to locale directories to load first e.g.
# "PREPEND_LOCALE_PATHS" : ["/edx/my-locales/"].
PREPEND_LOCALE_PATHS = []

# .. setting_name: DEFAULT_SITE_THEME
# .. setting_default: None
# .. setting_description: See LMS annotation.
Expand Down
1 change: 1 addition & 0 deletions cms/envs/devstack-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ PLATFORM_FACEBOOK_ACCOUNT: http://www.facebook.com/YourPlatformFacebookAccount
PLATFORM_NAME: Your Platform Name Here
PLATFORM_TWITTER_ACCOUNT: '@YourPlatformTwitterAccount'
POLICY_CHANGE_GRADES_ROUTING_KEY: edx.lms.core.default
PREPEND_LOCALE_PATHS: []
PRESS_EMAIL: press@example.com
PROCTORING_BACKENDS:
DEFAULT: 'null'
Expand Down
6 changes: 6 additions & 0 deletions cms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ def get_env_setting(setting):
# ],
COMPREHENSIVE_THEME_LOCALE_PATHS = ENV_TOKENS.get('COMPREHENSIVE_THEME_LOCALE_PATHS', [])

# PREPEND_LOCALE_PATHS contain the paths to locale directories to load first e.g.
# "PREPEND_LOCALE_PATHS" : [
# "/edx/my-locale/"
# ],
PREPEND_LOCALE_PATHS = ENV_TOKENS.get('PREPEND_LOCALE_PATHS', [])

#Timezone overrides
TIME_ZONE = ENV_TOKENS.get('CELERY_TIMEZONE', CELERY_TIMEZONE)

Expand Down
11 changes: 10 additions & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,9 @@ def _make_mako_template_dirs(settings):

# Localization strings (e.g. django.po) are under these directories
def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
locale_paths = [settings.REPO_ROOT + '/conf/locale'] # edx-platform/conf/locale/
locale_paths = list(settings.PREPEND_LOCALE_PATHS)
locale_paths += [settings.REPO_ROOT + '/conf/locale'] # edx-platform/conf/locale/

if settings.ENABLE_COMPREHENSIVE_THEMING:
# Add locale paths to settings for comprehensive theming.
for locale_path in settings.COMPREHENSIVE_THEME_LOCALE_PATHS:
Expand Down Expand Up @@ -4347,6 +4349,13 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
# "COMPREHENSIVE_THEME_LOCALE_PATHS" : ["/edx/src/edx-themes/conf/locale"].
COMPREHENSIVE_THEME_LOCALE_PATHS = []


# .. setting_name: PREPEND_LOCALE_PATHS
# .. setting_default: []
# .. setting_description: A list of the paths to locale directories to load first e.g.
# "PREPEND_LOCALE_PATHS" : ["/edx/my-locales/"].
PREPEND_LOCALE_PATHS = []

# .. setting_name: DEFAULT_SITE_THEME
# .. setting_default: None
# .. setting_description: Theme to use when no site or site theme is defined, for example
Expand Down
1 change: 1 addition & 0 deletions lms/envs/devstack-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ PLATFORM_FACEBOOK_ACCOUNT: http://www.facebook.com/YourPlatformFacebookAccount
PLATFORM_NAME: Your Platform Name Here
PLATFORM_TWITTER_ACCOUNT: '@YourPlatformTwitterAccount'
POLICY_CHANGE_GRADES_ROUTING_KEY: edx.lms.core.default
PREPEND_LOCALE_PATHS: []
PRESS_EMAIL: press@example.com
PROCTORING_BACKENDS:
DEFAULT: 'null'
Expand Down
7 changes: 7 additions & 0 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ def get_env_setting(setting):
COMPREHENSIVE_THEME_LOCALE_PATHS = ENV_TOKENS.get('COMPREHENSIVE_THEME_LOCALE_PATHS', [])


# PREPEND_LOCALE_PATHS contain the paths to locale directories to load first e.g.
# "PREPEND_LOCALE_PATHS" : [
# "/edx/my-locale"
# ],
PREPEND_LOCALE_PATHS = ENV_TOKENS.get('PREPEND_LOCALE_PATHS', [])


MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {}))
ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS = ENV_TOKENS.get(
'ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS',
Expand Down
2 changes: 2 additions & 0 deletions lms/envs/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@
COMPREHENSIVE_THEME_LOCALE_PATHS = [REPO_ROOT / "themes/conf/locale", ]
ENABLE_COMPREHENSIVE_THEMING = True

PREPEND_LOCALE_PATHS = []

LMS_ROOT_URL = "http://localhost:8000"

# Needed for derived settings used by cms only.
Expand Down