From 650b7332dd9e49449d254d4bd4e23b2b4c64c1df Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 8 Apr 2024 10:49:17 -0700 Subject: [PATCH] chore: fix some missing internationalization --- src/search-modal/BlockTypeLabel.jsx | 2 +- src/search-modal/SearchUI.jsx | 5 ++--- src/search-modal/messages.js | 10 ++++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/search-modal/BlockTypeLabel.jsx b/src/search-modal/BlockTypeLabel.jsx index 8eb41f613b..8a6048df47 100644 --- a/src/search-modal/BlockTypeLabel.jsx +++ b/src/search-modal/BlockTypeLabel.jsx @@ -19,7 +19,7 @@ const BlockTypeLabel = ({ type }) => { // Replace underscores and hypens with spaces, then let the browser capitalize this // in a locale-aware way to get a reasonable display value. // e.g. 'drag-and-drop-v2' -> "Drag And Drop V2" - return XXX {type.replace(/[_-]/g, ' ')}; + return {type.replace(/[_-]/g, ' ')}; }; export default BlockTypeLabel; diff --git a/src/search-modal/SearchUI.jsx b/src/search-modal/SearchUI.jsx index 6d008a3f96..8becfbe64d 100644 --- a/src/search-modal/SearchUI.jsx +++ b/src/search-modal/SearchUI.jsx @@ -48,7 +48,6 @@ const SearchUI = (props) => {
- {/* Give this toggle button a fixed width so it doesn't change size when the selected option changes */} { iconAfter={searchThisCourse ? Check : undefined} disabled={!props.courseId} > - This course + - All courses +
diff --git a/src/search-modal/messages.js b/src/search-modal/messages.js index f5979642a1..4f85c472e7 100644 --- a/src/search-modal/messages.js +++ b/src/search-modal/messages.js @@ -90,6 +90,16 @@ const messages = defineMessages({ defaultMessage: '{numResults, plural, one {# result} other {# results}} found', description: 'This count displays how many matching results were found from the user\'s search', }, + searchAllCourses: { + id: 'course-authoring.course-search.searchAllCourses', + defaultMessage: 'All courses', + description: 'Option to get search results from all courses.', + }, + searchThisCourse: { + id: 'course-authoring.course-search.searchThisCourse', + defaultMessage: 'This course', + description: 'Option to limit search results to the current course only.', + }, title: { id: 'course-authoring.course-search.title', defaultMessage: 'Search',