diff --git a/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx b/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx index c7308af6de..edc94587b0 100644 --- a/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx +++ b/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx @@ -438,8 +438,8 @@ const SharedAssignmentCatalog = ({ group, isLoading, shared }) => { diff --git a/packages/scratch-gui/src/locales/en.js b/packages/scratch-gui/src/locales/en.js index a72769defa..9a65eee272 100644 --- a/packages/scratch-gui/src/locales/en.js +++ b/packages/scratch-gui/src/locales/en.js @@ -373,7 +373,7 @@ export default { 'gui.classroom.shared.published': 'Published to みんなの課題: "{title}" (© {author} / CC BY 4.0)', 'gui.classroom.shared.openCatalog': 'Find in みんなの課題', 'gui.classroom.shared.catalogTitle': 'みんなの課題 — assignments shared by teachers nationwide', - 'gui.classroom.shared.catalogClose': 'Close', + 'gui.classroom.shared.catalogClose': 'Back', 'gui.classroom.shared.tabAll': 'Browse all', 'gui.classroom.shared.tabMine': 'My posts', 'gui.classroom.shared.filterAllLevels': 'All school levels', diff --git a/packages/scratch-gui/src/locales/ja-Hira.js b/packages/scratch-gui/src/locales/ja-Hira.js index 0f00609dda..942c8d5fc9 100644 --- a/packages/scratch-gui/src/locales/ja-Hira.js +++ b/packages/scratch-gui/src/locales/ja-Hira.js @@ -431,7 +431,7 @@ export default { 'gui.classroom.shared.passcodeImportBtn': 'このクラスにとりこむ', 'gui.classroom.shared.openCatalog': 'みんなのかだいからさがす', 'gui.classroom.shared.catalogTitle': 'みんなのかだい — ぜんこくのせんせいがきょうゆうしたかだい', - 'gui.classroom.shared.catalogClose': 'キャンセル', + 'gui.classroom.shared.catalogClose': 'もどる', 'gui.classroom.shared.tabAll': 'すべて', 'gui.classroom.shared.tabMine': 'じぶんのとうこう', 'gui.classroom.shared.filterAllLevels': 'すべてのがっこうしゅ', diff --git a/packages/scratch-gui/src/locales/ja.js b/packages/scratch-gui/src/locales/ja.js index a018aff8d6..7698d067ac 100644 --- a/packages/scratch-gui/src/locales/ja.js +++ b/packages/scratch-gui/src/locales/ja.js @@ -422,7 +422,7 @@ export default { 'gui.classroom.shared.passcodeImportBtn': 'このクラスに取り込む', 'gui.classroom.shared.openCatalog': 'みんなの課題からさがす', 'gui.classroom.shared.catalogTitle': 'みんなの課題 — 全国の先生が共有した課題', - 'gui.classroom.shared.catalogClose': 'キャンセル', + 'gui.classroom.shared.catalogClose': '戻る', 'gui.classroom.shared.tabAll': 'すべて', 'gui.classroom.shared.tabMine': '自分の投稿', 'gui.classroom.shared.filterAllLevels': 'すべての学校種', diff --git a/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx b/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx index 7c4fbaaf80..26ea45e1c4 100644 --- a/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx +++ b/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx @@ -163,6 +163,19 @@ describe('SharedAssignmentCatalog (issue #1070)', () => { expect(shared.handleLoadMoreCatalog).toHaveBeenCalled(); }); + test('the header back button is labelled "Back" and returns to the assignment list (issue #1121)', () => { + const shared = sharedState(); + renderCatalog(shared); + const back = byTestId('shared-catalog-close'); + expect(back).toBeInTheDocument(); + // Label must read "戻る" (Back), not "キャンセル"/"閉じる". + expect(back.textContent).toBe('Back'); + // Clicking it only closes the catalog, returning to the assignment + // board (課題一覧) — it must not navigate to the class list. + fireEvent.click(back); + expect(shared.handleCloseCatalog).toHaveBeenCalled(); + }); + test('the mine tab hides the filters and marks unlisted items', () => { renderCatalog(sharedState({ catalogTab: 'mine',