Clean up i18n: translate 404 page Chinese text and remove placeholder German locale
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,13 +15,13 @@ describe('404 Not Found Page', () => {
|
|||||||
loginWithFixtures();
|
loginWithFixtures();
|
||||||
cy.visit('/this-page-does-not-exist');
|
cy.visit('/this-page-does-not-exist');
|
||||||
cy.contains('404').should('be.visible');
|
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', () => {
|
it('has a link back to Files page', () => {
|
||||||
loginWithFixtures();
|
loginWithFixtures();
|
||||||
cy.visit('/some/random/path');
|
cy.visit('/some/random/path');
|
||||||
cy.contains('a', '回到 Files 頁')
|
cy.contains('a', 'Go to Files')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.should('have.attr', 'href', '/files');
|
.should('have.attr', 'href', '/files');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,28 +17,16 @@ import enLocale from './en.json';
|
|||||||
i18next
|
i18next
|
||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.init({
|
.init({
|
||||||
// 配置你的本地化選項
|
|
||||||
resources: {
|
resources: {
|
||||||
en: {
|
en: {
|
||||||
translation: enLocale
|
translation: enLocale
|
||||||
},
|
},
|
||||||
de: {
|
|
||||||
translation: {
|
|
||||||
greeting: 'Hallo!'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 添加其他語言的翻譯
|
|
||||||
},
|
},
|
||||||
// 選擇默認的語言
|
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
|
|
||||||
// 在初始化時自動檢測用戶的語言
|
|
||||||
detection: {
|
detection: {
|
||||||
order: ['localStorage', 'navigator'],
|
order: ['localStorage', 'navigator'],
|
||||||
caches: ['localStorage']
|
caches: ['localStorage']
|
||||||
},
|
},
|
||||||
|
|
||||||
// 選擇性配置其他選項...
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default i18next;
|
export default i18next;
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
<main>
|
<main>
|
||||||
<div class="container text-center pt-7 pb-12">
|
<div class="container text-center pt-7 pb-12">
|
||||||
<h2 class="mb-7">404</h2>
|
<h2 class="mb-7">404</h2>
|
||||||
<p>您想找的頁面不存在</p>
|
<p>The page you are looking for does not exist.</p>
|
||||||
<p class="mb-7">請重新確認搜尋的項目或是回到 Files 頁</p>
|
<p class="mb-7">Please check the URL or go back to the Files page.</p>
|
||||||
<router-link to="/files" class="btn btn-c-primary btn-lg">回到 Files 頁</router-link>
|
<router-link to="/files" class="btn btn-c-primary btn-lg">Go to Files</router-link>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user