feat: add toggle for unifying site & translation language (#37854)

This commit is contained in:
Nathan Sprenkle
2026-01-09 11:59:03 -05:00
committed by GitHub
parent 7111e8b18c
commit e45ae329e7

View File

@@ -2,7 +2,7 @@
Toggles for courseware in-course experience.
"""
from edx_toggles.toggles import SettingToggle, WaffleSwitch
from edx_toggles.toggles import SettingToggle, WaffleFlag, WaffleSwitch
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag
@@ -168,6 +168,19 @@ ENABLE_COURSE_DISCOVERY_DEFAULT_LANGUAGE_FILTER = WaffleSwitch(
f'{WAFFLE_FLAG_NAMESPACE}.discovery_default_language_filter', __name__
)
# .. toggle_name: courseware.unify_site_and_translation_language
# .. toggle_implementation: WaffleFlag
# .. toggle_default: False
# .. toggle_description: Update LMS to use site language for xpert unit translations and enable new header site language switcher.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2026-01-08
# .. toggle_target_removal_date: None
# .. toggle_warning: n/a
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/37854
ENABLE_UNIFIED_SITE_AND_TRANSLATION_LANGUAGE = WaffleFlag(
f'{WAFFLE_FLAG_NAMESPACE}.unify_site_and_translation_language', __name__
)
def course_exit_page_is_active(course_key):
return COURSEWARE_MICROFRONTEND_COURSE_EXIT_PAGE.is_enabled(course_key)