diff --git a/i18n/config.ts b/i18n/config.ts index 57bb64dd9..5a2a429bc 100644 --- a/i18n/config.ts +++ b/i18n/config.ts @@ -10,6 +10,7 @@ import translationCN from './translations/zh-CN.json'; import translationJP from './translations/ja-JP.json'; import translationUA from './translations/uk-UA.json'; import translationKM from './translations/km-KH.json'; +import translatiobTW from './translations/zh-TW.json'; const languages = { 'en-US': { @@ -39,6 +40,9 @@ const languages = { 'km-KH': { translation: translationKM, }, + 'zh-TW': { + translation: translatiobTW, + }, }; type Language = keyof typeof languages; @@ -52,7 +56,7 @@ i18n // in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US' lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language, fallbackLng: 'en-US', - whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'fr-FR', 'zh-CN', 'ja-JP', 'uk-UA', 'km-KH'], + whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'fr-FR', 'zh-CN', 'ja-JP', 'uk-UA', 'km-KH', 'zh-TW'], load: 'currentOnly', resources: languages, debug: false, diff --git a/i18n/translations/de-DE.json b/i18n/translations/de-DE.json index 5c01b82e1..ef288b8f8 100644 --- a/i18n/translations/de-DE.json +++ b/i18n/translations/de-DE.json @@ -146,6 +146,7 @@ "spanish": "Spanisch", "german": "Deutsch", "chinese": "Chinesisch", + "chineseTraditional": "Chinesisch (Traditionell)", "french": "Französisch", "ukraine": "Ukrainisch", "khmer": "Khmer" diff --git a/i18n/translations/en-US.json b/i18n/translations/en-US.json index 00f3b1d4a..0b560e3c3 100644 --- a/i18n/translations/en-US.json +++ b/i18n/translations/en-US.json @@ -146,6 +146,7 @@ "spanish": "Spanish", "german": "German", "chinese": "Chinese", + "chineseTraditional": "Chinese (Traditional)", "french": "French", "ukraine": "Ukraine", "khmer": "Khmer" diff --git a/i18n/translations/es-ES.json b/i18n/translations/es-ES.json index ca7b89578..e027d0caf 100644 --- a/i18n/translations/es-ES.json +++ b/i18n/translations/es-ES.json @@ -146,8 +146,8 @@ "spanish": "Español", "german": "Alemán", "chinese": "Chino", + "chineseTraditional": "Chino (Tradicional)", "french": "Francés", "ukraine": "Ucraniano", - "khmer": "Khmer" - } + "khmer": "Khmer" } } diff --git a/i18n/translations/fr-FR.json b/i18n/translations/fr-FR.json index e564b87a9..6ed4bc920 100644 --- a/i18n/translations/fr-FR.json +++ b/i18n/translations/fr-FR.json @@ -146,6 +146,7 @@ "spanish": "Espagnol", "german": "Allemand", "chinese": "Chinois", + "chineseTraditional": "Chinois (Traditionnel)", "french": "Français", "ukraine": "Ukrainien", "khmer": "Khmer" diff --git a/i18n/translations/ja-JP.json b/i18n/translations/ja-JP.json index 9b14fe2e7..5053b48c4 100644 --- a/i18n/translations/ja-JP.json +++ b/i18n/translations/ja-JP.json @@ -146,8 +146,9 @@ "spanish": "スペイン語", "german": "ドイツ語", "chinese": "中国語", + "chineseTraditional": "繁体字中国語", "french": "フランス語", "ukraine": "ウクライナ", - "khmer": "Khmer" + "khmer": "クメール語" } } diff --git a/i18n/translations/km-KH.json b/i18n/translations/km-KH.json index d78a43316..129ad410e 100644 --- a/i18n/translations/km-KH.json +++ b/i18n/translations/km-KH.json @@ -146,6 +146,7 @@ "spanish": "អេស្ប៉ាញ", "german": "អាឡឺម៉ង់", "chinese": "ចិន", + "chineseTraditional": "ជនជាតិចិន (ប្រពៃណី)", "french": "បារាំង", "ukraine": "អ៊ុយក្រែន", "khmer": "ខ្មែរ" diff --git a/i18n/translations/pt-BR.json b/i18n/translations/pt-BR.json index ff60f1d3c..3f506e358 100644 --- a/i18n/translations/pt-BR.json +++ b/i18n/translations/pt-BR.json @@ -146,6 +146,7 @@ "spanish": "Espanhol", "german": "Alemão", "chinese": "Chinês", + "chineseTraditional": "Chinês (Tradicional)", "french": "Francês", "ukraine": "Ucraniano", "khmer": "Khmer" diff --git a/i18n/translations/uk-UA.json b/i18n/translations/uk-UA.json index 291bdc8a2..549e61753 100644 --- a/i18n/translations/uk-UA.json +++ b/i18n/translations/uk-UA.json @@ -146,6 +146,7 @@ "spanish": "Іспанська", "german": "Німецька", "chinese": "Китайська", + "chineseTraditional": "Китайці (Традиційні)", "french": "Французька", "ukraine": "Українська", "khmer": "Khmer" diff --git a/i18n/translations/zh-CN.json b/i18n/translations/zh-CN.json index d5f98f585..1e0b8f169 100644 --- a/i18n/translations/zh-CN.json +++ b/i18n/translations/zh-CN.json @@ -146,8 +146,9 @@ "spanish": "西班牙语", "german": "德语", "chinese": "中文", + "chineseTraditional": "正体中文", "french": "法语", "ukraine": "乌克兰", - "khmer": "Khmer" + "khmer": "高棉语" } } diff --git a/i18n/translations/zh-TW.json b/i18n/translations/zh-TW.json new file mode 100644 index 000000000..f6f83740e --- /dev/null +++ b/i18n/translations/zh-TW.json @@ -0,0 +1,150 @@ +{ + "copy-to-clipboard": "複製到剪貼簿", + "author-anonymous": "匿名", + "action-bar-action": { + "visit-home-page": "瀏覽首頁", + "open-an-issue": "提交問題", + "download-tarball": "下載 tarball" + }, + "dialog": { + "registry-info": { + "title": "註冊資訊" + } + }, + "header": { + "documentation": "文件", + "registry-info": "註冊資訊", + "greetings": "你好 " + }, + "search": { + "packages": "搜尋套件" + }, + "auto-complete": { + "loading": "載入中...", + "no-results-found": "無結果" + }, + "tab": { + "uplinks": "Uplinks", + "versions": "版本", + "dependencies": "相依", + "readme": "Readme" + }, + "uplinks": { + "title": "Uplinks", + "no-items": "{{name}} has no uplinks." + }, + "versions": { + "current-tags": "當前標籤", + "version-history": "歷史版本", + "not-available": "無法取得" + }, + "package": { + "published-on": "發布於 {{time}} •", + "version": "v{{version}}", + "visit-home-page": "瀏覽首頁", + "homepage": "首頁", + "open-an-issue": "提交問題", + "bugs": "Bugs", + "download": "下载 {{what}}", + "the-tar-file": "tar 檔案", + "tarball": "Tarball" + }, + "dependencies": { + "has-no-dependencies": "{{package}} 沒有相依套件.", + "dependency-block": "{{package}}@{{version}}" + }, + "form": { + "username": "使用者名稱", + "password": "密碼" + }, + "form-placeholder": { + "username": "你的使用者名稱", + "password": "你的密碼" + }, + "form-validation": { + "required-field": "必填欄位", + "required-min-length": "長度不可短於 {{length}}", + "unable-to-sign-in": "無法登入", + "username-or-password-cant-be-empty": "使用者名稱或密碼不可空白!" + }, + "help": { + "title": "尚未發布任何 NPM 套件.", + "sub-title": "發布第一個 NPM 套件:", + "first-step": "1. 登入", + "first-step-command-line": "npm adduser --registry {{registryUrl}}", + "second-step": "2. 發布", + "second-step-command-line": "npm publish --registry {{registryUrl}}", + "third-step": "3. 重新整理頁面。" + }, + "sidebar": { + "detail": { + "latest-version": "最新版本 v{{version}}", + "version": "v{{version}}" + }, + "installation": { + "title": "安装", + "install-using-yarn": "使用 yarn 安装", + "install-using-yarn-command": "yarn add {{packageName}}", + "install-using-npm": "使用 npm 安装", + "install-using-npm-command": "npm install {{packageName}}", + "install-using-pnpm": "使用 pnpm 安装", + "install-using-pnpm-command": "pnpm install {{packageName}}" + }, + "repository": { + "title": "儲存庫" + }, + "author": { + "title": "作者" + }, + "distribution": { + "title": "發布資訊", + "license": "許可", + "size": "大小", + "file-count": "檔案數量" + }, + "maintainers": { + "title": "維護人員" + }, + "contributors": { + "title": "貢獻人員" + }, + "engines": { + "npm-version": "NPM 版本", + "node-js": "NODE JS" + } + }, + "footer": { + "powered-by": "Powered by", + "made-with-love-on": "Made with <0>♥ on" + }, + "button": { + "close": "關閉", + "cancel": "取消", + "login": "登入", + "logout": "登出", + "go-to-the-home-page": "前往首頁", + "learn-more": "了解更多", + "fund-this-package": "<0>Fund this package" + }, + "error": { + "unspecific": "發生錯誤。", + "404": { + "page-not-found": "404 - 頁面不存在", + "sorry-we-could-not-find-it": "不好意思, 找不到..." + }, + "app-context-not-correct-used": "app context 没有被正確使用", + "theme-context-not-correct-used": "theme context 没有被正確使用", + "package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext" + }, + "lng": { + "english": "英文", + "japanese": "日文", + "portuguese": "葡萄牙文", + "spanish": "西班牙文", + "german": "德文", + "chinese": "簡體中文", + "chineseTraditional":"正體中文", + "french": "法文", + "ukraine": "烏克蘭文", + "khmer": "高棉文" } +} diff --git a/package.json b/package.json index cc4a50020..907b220c8 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ }, { "path": "./static/main.*.js", - "maxSize": "35 kB" + "maxSize": "36 kB" }, { "path": "./static/[0-9].*.{js,css}", diff --git a/src/App/__snapshots__/App.test.tsx.snap b/src/App/__snapshots__/App.test.tsx.snap index 5556743be..b29411cca 100644 --- a/src/App/__snapshots__/App.test.tsx.snap +++ b/src/App/__snapshots__/App.test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` should display the Header component 1`] = ` -.emotion-93 { +.emotion-96 { background-color: #fff; } @@ -217,7 +217,7 @@ exports[` should display the Header component 1`] = ` } } -.emotion-91 { +.emotion-94 { background: #f9f9f9; border-top: 1px solid #e3e3e3; color: #999999; @@ -225,7 +225,7 @@ exports[` should display the Header component 1`] = ` padding: 20px; } -.emotion-89 { +.emotion-92 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -242,7 +242,7 @@ exports[` should display the Header component 1`] = ` } @media (min-width:768px) { - .emotion-89 { + .emotion-92 { min-width: 400px; max-width: 800px; margin: auto; @@ -254,12 +254,12 @@ exports[` should display the Header component 1`] = ` } @media (min-width:1024px) { - .emotion-89 { + .emotion-92 { max-width: 1240px; } } -.emotion-80 { +.emotion-83 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; @@ -268,7 +268,7 @@ exports[` should display the Header component 1`] = ` } @media (min-width:768px) { - .emotion-80 { + .emotion-83 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -281,12 +281,12 @@ exports[` should display the Header component 1`] = ` padding: 0 5px; } -.emotion-78 { +.emotion-81 { position: relative; height: 18px; } -.emotion-78:hover .emotion-77 { +.emotion-81:hover .emotion-80 { visibility: visible; } @@ -299,7 +299,7 @@ exports[` should display the Header component 1`] = ` padding: 0 10px; } -.emotion-76 { +.emotion-79 { position: absolute; background: #d3dddd; padding: 1px 4px; @@ -317,7 +317,7 @@ exports[` should display the Header component 1`] = ` top: -2px; } -.emotion-76:before { +.emotion-79:before { content: ''; position: absolute; top: 29%; @@ -339,7 +339,7 @@ exports[` should display the Header component 1`] = ` padding: 0 5px; } -.emotion-87 { +.emotion-90 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; @@ -352,7 +352,7 @@ exports[` should display the Header component 1`] = ` } @media (min-width:768px) { - .emotion-87 { + .emotion-90 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -360,7 +360,7 @@ exports[` should display the Header component 1`] = ` } } -.emotion-85 { +.emotion-88 { box-sizing: initial; display: inline-block; cursor: pointer; @@ -369,7 +369,7 @@ exports[` should display the Header component 1`] = ` padding: 0 5px; } -.emotion-82 { +.emotion-85 { width: 100%; height: auto; } @@ -422,7 +422,7 @@ exports[` should display the Header component 1`] = ` }
should display the Header component 1`] = `
Made with should display the Header component 1`] = ` on should display the Header component 1`] = ` /> should display the Header component 1`] = ` xlink:href="[object Object]#germany" /> + + + Taiwan + + +
Powered by Verdaccio @@ -902,7 +912,7 @@ exports[` should display the Header component 1`] = ` `; exports[` should display the Loading component at the beginning 1`] = ` -.emotion-83 { +.emotion-86 { background-color: #fff; } @@ -1118,7 +1128,7 @@ exports[` should display the Loading component at the beginning 1`] = ` } } -.emotion-81 { +.emotion-84 { background: #f9f9f9; border-top: 1px solid #e3e3e3; color: #999999; @@ -1126,7 +1136,7 @@ exports[` should display the Loading component at the beginning 1`] = ` padding: 20px; } -.emotion-79 { +.emotion-82 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -1143,7 +1153,7 @@ exports[` should display the Loading component at the beginning 1`] = ` } @media (min-width:768px) { - .emotion-79 { + .emotion-82 { min-width: 400px; max-width: 800px; margin: auto; @@ -1155,12 +1165,12 @@ exports[` should display the Loading component at the beginning 1`] = ` } @media (min-width:1024px) { - .emotion-79 { + .emotion-82 { max-width: 1240px; } } -.emotion-70 { +.emotion-73 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; @@ -1169,7 +1179,7 @@ exports[` should display the Loading component at the beginning 1`] = ` } @media (min-width:768px) { - .emotion-70 { + .emotion-73 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -1182,12 +1192,12 @@ exports[` should display the Loading component at the beginning 1`] = ` padding: 0 5px; } -.emotion-68 { +.emotion-71 { position: relative; height: 18px; } -.emotion-68:hover .emotion-67 { +.emotion-71:hover .emotion-70 { visibility: visible; } @@ -1200,7 +1210,7 @@ exports[` should display the Loading component at the beginning 1`] = ` padding: 0 10px; } -.emotion-66 { +.emotion-69 { position: absolute; background: #d3dddd; padding: 1px 4px; @@ -1218,7 +1228,7 @@ exports[` should display the Loading component at the beginning 1`] = ` top: -2px; } -.emotion-66:before { +.emotion-69:before { content: ''; position: absolute; top: 29%; @@ -1240,7 +1250,7 @@ exports[` should display the Loading component at the beginning 1`] = ` padding: 0 5px; } -.emotion-77 { +.emotion-80 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; @@ -1253,7 +1263,7 @@ exports[` should display the Loading component at the beginning 1`] = ` } @media (min-width:768px) { - .emotion-77 { + .emotion-80 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -1261,7 +1271,7 @@ exports[` should display the Loading component at the beginning 1`] = ` } } -.emotion-75 { +.emotion-78 { box-sizing: initial; display: inline-block; cursor: pointer; @@ -1270,13 +1280,13 @@ exports[` should display the Loading component at the beginning 1`] = ` padding: 0 5px; } -.emotion-72 { +.emotion-75 { width: 100%; height: auto; }