From 91ed45099b17174d8ad182ae9d0a87e280b38913 Mon Sep 17 00:00:00 2001 From: Luis Moreno Date: Fri, 25 Jan 2019 15:15:07 -0400 Subject: [PATCH] Fix Collapse All/Expand All translation --- .../static/course_experience/js/CourseOutline.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openedx/features/course_experience/static/course_experience/js/CourseOutline.js b/openedx/features/course_experience/static/course_experience/js/CourseOutline.js index 6a6a40cdb6..ca46563090 100644 --- a/openedx/features/course_experience/static/course_experience/js/CourseOutline.js +++ b/openedx/features/course_experience/static/course_experience/js/CourseOutline.js @@ -78,16 +78,17 @@ export class CourseOutline { // eslint-disable-line import/prefer-default-expor toggleAllButton.addEventListener('click', (event) => { const toggleAllExpanded = toggleAllButton.getAttribute('aria-expanded') === 'true'; let sectionAction; + /* globals gettext */ if (toggleAllExpanded) { toggleAllButton.setAttribute('aria-expanded', 'false'); sectionAction = collapseSection; toggleAllSpan.classList.add(extraPaddingClass); - toggleAllSpan.innerText = 'Expand All'; + toggleAllSpan.innerText = gettext('Expand All'); } else { toggleAllButton.setAttribute('aria-expanded', 'true'); sectionAction = expandSection; toggleAllSpan.classList.remove(extraPaddingClass); - toggleAllSpan.innerText = 'Collapse All'; + toggleAllSpan.innerText = gettext('Collapse All'); } const sections = Array.prototype.slice.call(document.querySelectorAll('.accordion-trigger')); sections.forEach((sectionToggleButton) => {