Skip to content

Commit

Permalink
wip: zh-tw to zh-hant
Browse files Browse the repository at this point in the history
  • Loading branch information
ben196888 committed Nov 17, 2023
1 parent d52a028 commit 04273f9
Show file tree
Hide file tree
Showing 72 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions homepage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Decap CMS 支援 Markdown 語法,如對此不熟悉可參考以下兩個網站

1. 增加語言於 [`next.config.js`](./next.config.js) 中的 `i18n.locales` 陣列中。語言代碼請參考 [BCP 47](https://www.w3.org/International/questions/qa-choosing-language-tags#question), [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), [ISO 639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes), [ISO 639-3](https://en.wikipedia.org/wiki/List_of_ISO_639-3_codes)

目前支援的語言有 `zh-tw`, `en`
目前支援的語言有 `zh-Hant`, `en`

```js
// next.config.js
i18n: {
locales: ['zh-tw', 'en'],
defaultLocale: 'zh-tw',
locales: ['zh-Hant', 'en'],
defaultLocale: 'zh-Hant',
},

// decap-cms.config.js
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions homepage/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
module.exports = {
swcMinify: true,
i18n: {
locales: ['zh-tw', 'en'],
defaultLocale: 'zh-tw',
locales: ['zh-Hant', 'en'],
defaultLocale: 'zh-Hant',
},
trailingSlash: true,
};
2 changes: 1 addition & 1 deletion homepage/src/layouts/header/languageDropdownMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from 'next/link';

const languageLabelDictionary = {
en: 'English',
'zh-tw': '中文',
'zh-Hant': '中文',
};

const LanguageDropdownMenu = () => {
Expand Down
4 changes: 2 additions & 2 deletions homepage/src/pages/404.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export const getStaticProps = async ({ locale }) => {
const headInfo = {
title: {
en: `OpenStarTerVillage - Page Not Found`,
'zh-tw': `開源星手村 - 找不到網頁`,
'zh-Hant': `開源星手村 - 找不到網頁`,
},
};

const desc = {
en: `
Bug report? Ask TwoMore. <a href="https://forms.gle/t9j8dbiKUohny8PZ8">Filling the form</a> to report a bug!
`,
'zh-tw': `
'zh-Hant': `
有問題?找兔摩。<a href="https://forms.gle/t9j8dbiKUohny8PZ8">填寫表單</a>回報你找到的問題吧!
`,
};
Expand Down
2 changes: 1 addition & 1 deletion homepage/src/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const siteDataDictionary = {
description: `How can technology change the world? Play this board game and discover the answer for yourself!`,
logo: `/images/logo.png`,
},
'zh-tw': {
'zh-Hant': {
title: `開源星手村`,
description: `科技怎麼改變世界?玩桌遊、就知道!`,
logo: `/images/logo.png`,
Expand Down
2 changes: 1 addition & 1 deletion homepage/src/pages/cards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getStaticProps = async ({ locale }) => {
const headInfo = {
title: {
en: `OpenStarTerVillage - Card Introduction`,
'zh-tw': `開源星手村 - 卡片介紹`,
'zh-Hant': `開源星手村 - 卡片介紹`,
},
};

Expand Down
4 changes: 2 additions & 2 deletions homepage/src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export const getStaticProps = async ({ locale }) => {
const headInfo = {
title: {
en: `OpenStarTerVillage`,
'zh-tw': `開源星手村`,
'zh-Hant': `開源星手村`,
},
description: {
en: `How can technology change the world? Play this board game and discover the answer for yourself!`,
'zh-tw': `科技怎麼改變世界?玩桌遊、就知道!`,
'zh-Hant': `科技怎麼改變世界?玩桌遊、就知道!`,
},
};

Expand Down
2 changes: 1 addition & 1 deletion homepage/src/pages/resource.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getStaticProps = async ({ locale }) => {
const headInfo = {
title: {
en: `OpenStarTerVillage - Resource`,
'zh-tw': `開源星手村 - 資源頁`,
'zh-Hant': `開源星手村 - 資源頁`,
},
};

Expand Down

0 comments on commit 04273f9

Please sign in to comment.