From d7db387edf5583b5e374b580771883d0bc0c5b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 6 Mar 2026 21:02:33 +0800 Subject: [PATCH] Clean up i18n: translate 404 page Chinese text and remove placeholder German locale Co-Authored-By: Claude Opus 4.6 --- cypress/e2e/notFound404.cy.js | 4 ++-- src/i18n/i18n.js | 12 ------------ src/views/NotFound404.vue | 6 +++--- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/cypress/e2e/notFound404.cy.js b/cypress/e2e/notFound404.cy.js index 43e934e..4b169b3 100644 --- a/cypress/e2e/notFound404.cy.js +++ b/cypress/e2e/notFound404.cy.js @@ -15,13 +15,13 @@ describe('404 Not Found Page', () => { loginWithFixtures(); cy.visit('/this-page-does-not-exist'); cy.contains('404').should('be.visible'); - cy.contains('您想找的頁面不存在').should('be.visible'); + cy.contains('The page you are looking for does not exist.').should('be.visible'); }); it('has a link back to Files page', () => { loginWithFixtures(); cy.visit('/some/random/path'); - cy.contains('a', '回到 Files 頁') + cy.contains('a', 'Go to Files') .should('be.visible') .should('have.attr', 'href', '/files'); }); diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index ee0ac58..1787d92 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -17,28 +17,16 @@ import enLocale from './en.json'; i18next .use(LanguageDetector) .init({ - // 配置你的本地化選項 resources: { en: { translation: enLocale }, - de: { - translation: { - greeting: 'Hallo!' - } - } - // 添加其他語言的翻譯 }, - // 選擇默認的語言 fallbackLng: 'en', - - // 在初始化時自動檢測用戶的語言 detection: { order: ['localStorage', 'navigator'], caches: ['localStorage'] }, - - // 選擇性配置其他選項... }); export default i18next; \ No newline at end of file diff --git a/src/views/NotFound404.vue b/src/views/NotFound404.vue index 005ebaa..6ff590f 100644 --- a/src/views/NotFound404.vue +++ b/src/views/NotFound404.vue @@ -6,9 +6,9 @@

404

-

您想找的頁面不存在

-

請重新確認搜尋的項目或是回到 Files 頁

- 回到 Files 頁 +

The page you are looking for does not exist.

+

Please check the URL or go back to the Files page.

+ Go to Files