From bc46bce88260a4de67f7d4dd5c9e9f66877ea995 Mon Sep 17 00:00:00 2001 From: scott lee Date: Wed, 22 Jan 2025 14:02:12 +0900 Subject: [PATCH 1/2] Add traditional Chinese --- crowdin.yml | 10 +++++++--- docusaurus.config.js | 9 ++++++++- src/theme/Footer/Feedback/Feedback.js | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/crowdin.yml b/crowdin.yml index a2aaddcc3955..996baddd9ec0 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,12 +1,16 @@ project_id: '684038' api_token_env: CROWDIN_PERSONAL_TOKEN -languages_mapping: +preserve_hierarchy: true +languages_mapping: &languages_mapping two_letters_code: zh-CN: zh-CN -preserve_hierarchy: 1 + zh-TW: zh-TW files: + # JSON translation files - source: /i18n/en/**/*.json translation: /i18n/%two_letters_code%/**/%original_file_name% - languages_mapping: [] + languages_mapping: *languages_mapping + # Docs Markdown files - source: /docs/**/*.* translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% + languages_mapping: *languages_mapping \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 9757dd88b852..3bff6910d9b9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -31,7 +31,7 @@ const config = { i18n: { defaultLocale: 'en', - locales: ['en', 'ko', 'zh-CN', 'vi'], + locales: ['en', 'ko', 'zh-CN', 'zh-TW', 'vi'], path: 'i18n', localeConfigs: { 'en': { @@ -55,6 +55,13 @@ const config = { calendar: 'gregory', path: 'zh-CN', }, + 'zh-TW': { + label: '繁體中文', + direction: 'ltr', + htmlLang: 'zh-Hant', + calendar: 'gregory', + path: 'zh-TW', + }, 'vi': { label: 'Tiếng Việt', direction: 'ltr', diff --git a/src/theme/Footer/Feedback/Feedback.js b/src/theme/Footer/Feedback/Feedback.js index 2cbb2ee3dec8..e3d1b68bbc0b 100644 --- a/src/theme/Footer/Feedback/Feedback.js +++ b/src/theme/Footer/Feedback/Feedback.js @@ -55,6 +55,22 @@ const placeholders = { ratingPlaceholder: "本页对您有帮助吗?", ratingStarsPlaceholder: "您如何评价本页面?" }, + 'zh-TW': { + feedbackButtonText: "讓這個頁面變得更好", + modalTitle: "您的反饋使我們與衆不同。讓我們知道如何做得更好", + emailPlaceholder: "輸入您的電子郵件", + errorMessage: "請稍後再試", + modalTitleError403: "請求的 URL 與 PushFeedback 中爲該項目定義的 URL 不匹配", + modalTitleError404: "我們無法在 PushFeedback 中找到所提供的項目 ID。", + messagePlaceholder: "評論", + modalTitleError: "哎呀!", + modalTitleSuccess: "感謝您的反饋!", + screenshotButtonText: "添加截圖", + screenshotTopbarText: "在頁面上選擇一個元素", + sendButtonText: "發送", + ratingPlaceholder: "本頁對您有幫助嗎?", + ratingStarsPlaceholder: "您如何評價本頁面?" + }, 'vi': { feedbackButtonText: "Cải thiện trang này", modalTitle: "Phản hồi của bạn giúp chúng tôi cải thiện.", From f3c3eeff3aa05ab2964519b6750303931d7b7f99 Mon Sep 17 00:00:00 2001 From: scott lee Date: Wed, 22 Jan 2025 14:25:56 +0900 Subject: [PATCH 2/2] Add new translation strings --- i18n/en/code.json | 4 ++-- .../current.json | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/i18n/en/code.json b/i18n/en/code.json index 0c4c9768ea00..5bd59ac3ac05 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -549,11 +549,11 @@ }, "homepage.favorites.rpc.title": { "message": "Public JSON RPC Endpoints", - "description": "Title for Public JSON RPC Endpoints" + "description": "Title for RPC Endpoints" }, "homepage.favorites.rpc.description": { "message": "Build and test your products without running your own node.", - "description": "Description for Public JSON RPC Endpoints" + "description": "Description for RPC Endpoints" }, "homepage.favorites.wallets.title": { "message": "Wallets", diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json index 637cbdb3dd34..2d0e8ad81237 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current.json +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -274,5 +274,29 @@ "sidebar.miniDappSidebar.category.Transition to Kaia": { "message": "Transition to Kaia", "description": "The label for category Transition to Kaia in sidebar miniDappSidebar" + }, + "sidebar.learnSidebar.category.Core Concepts": { + "message": "Core Concepts", + "description": "The label for category Core Concepts in sidebar learnSidebar" + }, + "sidebar.learnSidebar.category.Smart Contracts": { + "message": "Smart Contracts", + "description": "The label for category Smart Contracts in sidebar learnSidebar" + }, + "sidebar.learnSidebar.category.Advanced Topics": { + "message": "Advanced Topics", + "description": "The label for category Advanced Topics in sidebar learnSidebar" + }, + "sidebar.learnSidebar.category.Transaction Execution": { + "message": "Transaction Execution", + "description": "The label for category Transaction Execution in sidebar learnSidebar" + }, + "sidebar.learnSidebar.category.Token Economics": { + "message": "Token Economics", + "description": "The label for category Token Economics in sidebar learnSidebar" + }, + "sidebar.buildSidebar.category.Transactions": { + "message": "Transactions", + "description": "The label for category Transactions in sidebar buildSidebar" } }