Skip to content

Commit

Permalink
Transfer string from component to commonCoach
Browse files Browse the repository at this point in the history
  • Loading branch information
muditchoudhary committed Dec 21, 2023
1 parent e727dd0 commit 11114d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ const coachStrings = createTranslator('CommonCoachStrings', {
context:
'Indicates to the coach how many questions the learner answered correctly compared to the previous attempt',
},
coachReportsLesson: {
message: 'Report lesson',
context: 'Labels the Reports > Lesson tab for screen reader users',
},
});

// Strings for the Missing Content modals, tooltips, alerts, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<KTabsList
ref="tabList"
:tabsId="REPORTS_LESSON_TABS_ID"
:ariaLabel="$tr('coachReportsLesson')"
:ariaLabel="coachReportsLesson$()"
:activeTabId="activeTabId"
:tabs="tabs"
@click="() => saveTabsClick(REPORTS_LESSON_TABS_ID)"
Expand Down Expand Up @@ -71,6 +71,7 @@
import sortBy from 'lodash/sortBy';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import commonCoach from '../common';
import { coachStrings } from '../common/commonCoachStrings';
import CoachAppBarPage from '../CoachAppBarPage';
import CSVExporter from '../../csv/exporter';
import * as csvFields from '../../csv/fields';
Expand All @@ -92,10 +93,12 @@
},
mixins: [commonCoach, commonCoreStrings],
setup() {
const {coachReportsLesson$} = coachStrings();
const { saveTabsClick, wereTabsClickedRecently } = useCoachTabs();
return {
saveTabsClick,
wereTabsClickedRecently,
coachReportsLesson$,
};
},
props: {
Expand Down Expand Up @@ -271,12 +274,6 @@
}
},
},
$trs: {
coachReportsLesson: {
message: 'Report lesson',
context: 'Labels the Reports > Lesson tab for screen reader users',
},
},
};
</script>
Expand Down

0 comments on commit 11114d4

Please sign in to comment.