Skip to content

Commit

Permalink
fix: the filename case issue with generate-i18n-locale add zh-hk (#463)
Browse files Browse the repository at this point in the history
* fix: 补齐lang缺失的翻译

* FIX: ad-dz, ar-ma, ar-sa not work bug

* 補齊繁體中文翻譯

* Update generate-i18n-locale.ts

* feat: add Traditional Chinese ( Hong Kong)

* chore: en first

Signed-off-by: Innei <i@innei.in>

---------

Signed-off-by: Innei <i@innei.in>
Co-authored-by: Innei <i@innei.in>
  • Loading branch information
jerryc127 and Innei authored Sep 18, 2024
1 parent 0877448 commit a2eeb25
Show file tree
Hide file tree
Showing 21 changed files with 635 additions and 46 deletions.
3 changes: 3 additions & 0 deletions apps/main/src/@types/default-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import common_fr from "../../../../locales/common/fr.json"
import common_ja from "../../../../locales/common/ja.json"
import common_pt from "../../../../locales/common/pt.json"
import common_zhCN from "../../../../locales/common/zh-CN.json"
import common_zhhk from "../../../../locales/common/zh-HK.json"
import common_zhTW from "../../../../locales/common/zh-TW.json"
import external_en from "../../../../locales/external/en.json"
import lang_ardz from "../../../../locales/lang/ar-DZ.json"
Expand All @@ -19,6 +20,7 @@ import lang_fr from "../../../../locales/lang/fr.json"
import lang_ja from "../../../../locales/lang/ja.json"
import lang_pt from "../../../../locales/lang/pt.json"
import lang_zhCN from "../../../../locales/lang/zh-CN.json"
import lang_zhhk from "../../../../locales/lang/zh-HK.json"
import lang_zhTW from "../../../../locales/lang/zh-TW.json"
import settings_en from "../../../../locales/settings/en.json"
import shortcuts_en from "../../../../locales/shortcuts/en.json"
Expand Down Expand Up @@ -53,4 +55,5 @@ export const defaultResources = {
es: { lang: lang_es, common: common_es },
fr: { lang: lang_fr, common: common_fr },
pt: { lang: lang_pt, common: common_pt },
"zh-HK": { lang: lang_zhhk, common: common_zhhk },
}
5 changes: 3 additions & 2 deletions apps/renderer/src/@types/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const langs = ["en", "ja", "zh-CN", "zh-TW", "pt", "fr", "ar-DZ", "ar-SA", "ar-MA"]
export const currentSupportedLanguages = langs.sort()
const langs = ["ja", "zh-CN", "zh-TW", "pt", "fr", "ar-DZ", "ar-SA", "ar-MA", "zh-HK"]
export const currentSupportedLanguages = ["en", ...langs.sort()]
export const dayjsLocaleImportMap = {
en: ["en", () => import("dayjs/locale/en")],
["zh-CN"]: ["zh-cn", () => import("dayjs/locale/zh-cn")],
Expand All @@ -11,6 +11,7 @@ export const dayjsLocaleImportMap = {
["fr"]: ["fr", () => import("dayjs/locale/fr")],
["pt"]: ["pt", () => import("dayjs/locale/pt")],
["zh-TW"]: ["zh-tw", () => import("dayjs/locale/zh-tw")],
["zh-HK"]: ["zh-hk", () => import("dayjs/locale/zh-hk")],
}
export const ns = ["app", "common", "lang", "settings", "shortcuts"] as const
export const defaultNS = "app" as const
210 changes: 210 additions & 0 deletions locales/app/zh-HK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"ai_daily.title": "頭條新聞 - {{title}}",
"ai_daily.tooltip.content": "以下是由 AI 從你的時間線中選出的新聞(<From /> - <To />),可能對你很重要。",
"ai_daily.tooltip.update_schedule": "每天上午 8 點和下午 8 點更新。",
"app.copy_logo_svg": "複製 Logo SVG",
"app.toggle_sidebar": "切換側邊欄",
"discover.any_url_or_keyword": "任何網址或關鍵字",
"discover.default_option": " (預設)",
"discover.feed_description": "此訂閱源的描述如下,你可以根據相關資訊填寫參數表格。",
"discover.feed_maintainers": "此訂閱源由 RSSHub 提供,感謝 <maintainers />",
"discover.import.click_to_upload": "上傳 OPML 文件",
"discover.popular": "熱門",
"discover.preview": "預覽",
"discover.rss_hub_route": "RSSHub 路由",
"discover.rss_url": "RSS 網址",
"discover.select_placeholder": "選擇",
"early_access": "提前體驗",
"entry_actions.copy_link": "複製連結",
"entry_actions.failed_to_save_to_eagle": "無法保存至 Eagle。",
"entry_actions.failed_to_save_to_instapaper": "無法保存至 Instapaper。",
"entry_actions.failed_to_save_to_readwise": "無法保存至 Readwise。",
"entry_actions.link_copied": "連結已複製到剪貼簿。",
"entry_actions.mark_as_read": "標記為已讀",
"entry_actions.mark_as_unread": "標記為未讀",
"entry_actions.open_in_browser": "在瀏覽器中開啟",
"entry_actions.save_media_to_eagle": "保存媒體至 Eagle",
"entry_actions.save_to_instapaper": "保存至 Instapaper",
"entry_actions.save_to_readwise": "保存至 Readwise",
"entry_actions.saved_to_eagle": "已保存至 Eagle。",
"entry_actions.saved_to_instapaper": "已保存至 Instapaper。",
"entry_actions.saved_to_readwise": "已保存至 Readwise。",
"entry_actions.share": "分享",
"entry_actions.star": "收藏",
"entry_actions.starred": "已收藏。",
"entry_actions.tip": "贊助",
"entry_actions.unstar": "取消收藏",
"entry_actions.unstarred": "已取消收藏。",
"entry_column.filtered_content_tip": "你已隱藏篩選內容。",
"entry_column.filtered_content_tip_2": "除了以上顯示的條目,還有一些已篩選的內容。",
"entry_column.refreshing": "刷新新條目中...",
"entry_content.ai_summary": "AI 摘要",
"entry_content.fetching_content": "正在抓取原始內容並處理中...",
"entry_content.header.play_tts": "播放 TTS",
"entry_content.header.readability": "Readability",
"entry_content.no_content": "無內容",
"entry_content.readability_notice": "此內容由 Readability 提供。如果你發現排版異常,請到來源網站查看原始內容。",
"entry_content.render_error": "渲染錯誤:",
"entry_content.report_issue": "報告問題",
"entry_content.support_amount": "{{amount}} 人支持了此訂閱源的創作者。",
"entry_content.support_creator": "支持創作者",
"entry_content.web_app_notice": "網頁應用可能不支持此內容類型。你可以下載桌面應用程式。",
"entry_list.zero_unread": "全部已讀",
"entry_list_header.daily_report": "每日報告",
"entry_list_header.hide_no_image_items": "隱藏沒有圖片的條目。",
"entry_list_header.items": "項目",
"entry_list_header.new_entries_available": "有新條目可用",
"entry_list_header.refetch": "重新抓取",
"entry_list_header.refresh": "刷新",
"entry_list_header.show_all": "顯示所有",
"entry_list_header.show_all_items": "顯示所有條目",
"entry_list_header.show_unread_only": "僅顯示未讀",
"entry_list_header.switch_to_grid": "切換到網格視圖",
"entry_list_header.switch_to_masonry": "切換到 Masonry 視圖",
"entry_list_header.unread": "未讀",
"feed_claim_modal.choose_verification_method": "有三種驗證方法可選,你可以選擇其中一種進行驗證。",
"feed_claim_modal.claim_button": "認領",
"feed_claim_modal.content_instructions": "複製以下內容並貼到你最新的 RSS 訂閱源中。",
"feed_claim_modal.description_current": "當前描述:",
"feed_claim_modal.description_instructions": "複製以下內容並貼到你的 RSS 訂閱源中的 <code /> 欄位。",
"feed_claim_modal.failed_to_load": "無法加載認領信息",
"feed_claim_modal.rss_format_choice": "RSS 生成器通常有兩種格式可選。請根據需要複製以下的 XML 和 JSON 格式。",
"feed_claim_modal.rss_instructions": "複製以下代碼並貼到你的 RSS 生成器中。",
"feed_claim_modal.rss_json_format": "JSON 格式",
"feed_claim_modal.rss_xml_format": "XML 格式",
"feed_claim_modal.rsshub_notice": "此訂閱源由 RSSHub 提供,緩存時間為1小時。發布內容後,請等待最多1小時更改才能生效。",
"feed_claim_modal.tab_content": "內容",
"feed_claim_modal.tab_description": "描述",
"feed_claim_modal.tab_rss": "RSS 標籤",
"feed_claim_modal.verify_ownership": "要認領這個訂閱源,你需要驗證所有權。",
"feed_form.add_follow": "新增關注",
"feed_form.category": "分類",
"feed_form.category_description": "默認情況下,你的關注會按網站分組。",
"feed_form.error_fetching_feed": "獲取訂閱源時出錯。",
"feed_form.feed_not_found": "未找到訂閱源。",
"feed_form.feedback": "反饋",
"feed_form.follow": "關注",
"feed_form.followed": "🎉 已關注。",
"feed_form.private_follow": "私人關注",
"feed_form.private_follow_description": "此關注是否在你的個人資料頁面上公開可見。",
"feed_form.retry": "重試",
"feed_form.title": "標題",
"feed_form.title_description": "此資訊流的自定義標題。留空則使用默認標題。",
"feed_form.unfollow": "取消關注",
"feed_form.update": "更新",
"feed_form.update_follow": "更新關注",
"feed_form.updated": "🎉 已更新。",
"feed_form.view": "視圖",
"feed_item.claimed_by_owner": "訂閲源所有者",
"feed_item.claimed_by_unknown": "未知所有者",
"feed_item.claimed_by_you": "由你認領",
"feed_item.claimed_feed": "已認領訂閱源",
"feed_item.error_since": "錯誤始於",
"feed_item.not_publicly_visible": "在你的個人頁面上不公開可見",
"feed_view_type.articles": "文章",
"feed_view_type.audios": "音頻",
"feed_view_type.notifications": "通知",
"feed_view_type.pictures": "圖片",
"feed_view_type.social_media": "社交媒體",
"feed_view_type.videos": "視頻",
"mark_all_read_button.auto_confirm_info": "將在 3 秒後自動確認。",
"mark_all_read_button.confirm": "確認",
"mark_all_read_button.confirm_mark_all": "確定將 {{which}} 標記為已讀?",
"mark_all_read_button.confirm_mark_all_info": "確定將所有標記為已讀?",
"mark_all_read_button.mark_all_as_read": "全部標記為已讀",
"mark_all_read_button.mark_as_read": "標記 {{which}} 為已讀",
"mark_all_read_button.undo": "撤銷",
"player.back_10s": "倒退 10 秒",
"player.close": "關閉",
"player.download": "下載",
"player.exit_full_screen": "退出全屏",
"player.forward_10s": "快進 10 秒",
"player.full_screen": "全屏",
"player.mute": "靜音",
"player.open_entry": "打開條目",
"player.pause": "暫停",
"player.play": "播放",
"player.playback_rate": "播放速度",
"player.unmute": "取消靜音",
"player.volume": "音量",
"search.empty.no_results": "未找到結果。",
"search.group.entries": "條目",
"search.group.feeds": "訂閱源",
"search.options.all": "所有",
"search.options.entries": "條目",
"search.options.feeds": "訂閱源",
"search.options.search_type": "搜尋類型",
"search.placeholder": "搜尋...",
"search.result_count_local_mode": "(本地模式)",
"search.tooltip.local_search": "此搜尋涵蓋本地可用的數據。嘗試重新獲取以包括最新數據。",
"shortcuts.guide.title": "快捷鍵指南",
"sidebar.category_remove_dialog.cancel": "取消",
"sidebar.category_remove_dialog.continue": "繼續",
"sidebar.category_remove_dialog.description": "此操作將刪除你的分類,但其中的訂閱源將保留並按網站分組。",
"sidebar.category_remove_dialog.title": "刪除分類",
"sidebar.feed_actions.claim": "認領",
"sidebar.feed_actions.claim_feed": "認領訂閱源",
"sidebar.feed_actions.copy_feed_id": "複製訂閱源 ID",
"sidebar.feed_actions.copy_feed_url": "複製訂閱源 URL",
"sidebar.feed_actions.edit": "編輯",
"sidebar.feed_actions.edit_feed": "編輯訂閱源",
"sidebar.feed_actions.feed_owned_by_you": "此訂閱源由你擁有",
"sidebar.feed_actions.mark_all_as_read": "全部標記為已讀",
"sidebar.feed_actions.navigate_to_feed": "導航到訂閱源",
"sidebar.feed_actions.open_feed_in_browser": "在瀏覽器中打開訂閱源",
"sidebar.feed_actions.open_site_in_browser": "在瀏覽器中打開網站",
"sidebar.feed_actions.unfollow": "取消關注",
"sidebar.feed_actions.unfollow_feed": "取消關注訂閱源",
"sidebar.feed_column.context_menu.change_to_other_view": "切換到其他視圖",
"sidebar.feed_column.context_menu.delete_category": "刪除分類",
"sidebar.feed_column.context_menu.delete_category_confirmation": "確定刪除分類 {{folderName}}?",
"sidebar.feed_column.context_menu.mark_as_read": "標記為已讀",
"sidebar.feed_column.context_menu.rename_category": "重新命名分類",
"sidebar.select_sort_method": "選擇排序方法",
"signin.continue_with_github": "繼續使用 GitHub",
"signin.continue_with_google": "繼續使用 Google",
"signin.sign_in_to": "登入至",
"sync_indicator.disabled": "由於安全原因,同步已禁用。",
"sync_indicator.offline": "離線",
"sync_indicator.synced": "已與伺服器同步",
"tip_modal.amount": "金額",
"tip_modal.claim_feed": "認領這個訂閱源",
"tip_modal.create_wallet": "免費創建",
"tip_modal.feed_owner": "訂閱源擁有者",
"tip_modal.low_balance": "你的餘額不足以覆蓋此贊助。請調整金額。",
"tip_modal.no_wallet": "你尚未擁有錢包。請創建一個錢包以進行贊助。",
"tip_modal.tip_amount_sent": "已經發送給作者。",
"tip_modal.tip_now": "立刻贊助",
"tip_modal.tip_sent": "贊助成功!感謝你的支持。",
"tip_modal.tip_support": "⭐ 贊助以顯示你的支持!",
"tip_modal.unclaimed_feed": "目前尚未有人認領此訂閱源。收到的 Power 將安全地保留在區塊鏈合約中,直到被認領為止。",
"user_button.account": "帳戶",
"user_button.download_desktop_app": "下載桌面應用",
"user_button.log_out": "登出",
"user_button.power": "Power",
"user_button.preferences": "偏好設定",
"user_button.profile": "個人檔案",
"user_profile.close": "關閉",
"user_profile.edit": "編輯",
"user_profile.loading": "載入中",
"user_profile.share": "分享",
"user_profile.toggle_item_style": "切換條目樣式",
"words.add": "新增",
"words.confirm": "確認",
"words.discover": "探索",
"words.email": "電子郵件",
"words.import": "匯入",
"words.items": "項目",
"words.language": "語言",
"words.load_archived_entries": "加載已存檔的條目",
"words.login": "登入",
"words.rss": "RSS",
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "搜尋",
"words.starred": "收藏",
"words.unread": "未讀",
"words.user": "用戶",
"words.which.all": "所有",
"words.zero_items": "零項目"
}
28 changes: 28 additions & 0 deletions locales/common/zh-HK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"app.copied_to_clipboard": "已複製到剪貼簿",
"cancel": "取消",
"confirm": "確認",
"ok": "確定",
"quantifier.piece": "",
"time.last_night": "昨晚",
"time.the_night_before_last": "前晚",
"time.today": "今天",
"time.yesterday": "昨天",
"tips.load-lng-error": "加載語言包失敗",
"words.back": "返回",
"words.copy": "複製",
"words.edit": "編輯",
"words.entry": "條目",
"words.id": "ID",
"words.items_one": "項目",
"words.items_other": "項目",
"words.local": "本地",
"words.record": "記錄",
"words.record_one": "記錄",
"words.record_other": "記錄",
"words.result": "結果",
"words.result_one": "結果",
"words.result_other": "結果",
"words.space": " ",
"words.which.all": "全部"
}
43 changes: 43 additions & 0 deletions locales/external/zh-HK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"copied_link": "鏈接已複製到剪貼簿",
"feed": {
"follower_one": "追隨者",
"follower_other": "追隨者",
"followsAndReads": "{{subscriptionCount}} 個 {{subscriptionNoun}} 和 {{readCount}} 個 {{readNoun}} 在 {{appName}}",
"read_one": "閱讀",
"read_other": "閱讀數"
},
"header": {
"app": "應用程式",
"download": "下載"
},
"invitation": {
"activate": "激活",
"codeOptions": {
"1": "尋找任何內測測試用戶邀請你。",
"2": "加入我們的 Discord 伺服器,不定期贈送邀請碼。",
"3": "關注我們的 X 帳戶,不定期贈送邀請碼。"
},
"earlyAccess": "Follow 目前處於早期訪問階段,使用需要邀請碼。",
"earlyAccessMessage": "😰 抱歉,Follow 目前處於早期訪問階段,使用需要邀請碼。",
"generateButton": "生成新邀請碼",
"generateCost": "你可以花費 {{INVITATION_PRICE}} Power 為你的朋友生成邀請碼。",
"getCodeMessage": "你可以通過以下方式獲取邀請碼:",
"title": "邀請碼"
},
"login": {
"backToWebApp": "返回網頁應用程式",
"continueWithGitHub": "繼續使用 GitHub",
"continueWithGoogle": "繼續使用 Google",
"logInTo": "登錄到",
"openApp": "打開應用程式",
"redirecting": "重定向中",
"welcomeTo": "歡迎來到"
},
"redirect": {
"continueInBrowser": "在瀏覽器中繼續",
"instruction": "現在是時候打開 {{APP_NAME}} 並安全地關閉此頁面。",
"openApp": "打開 {{APP_NAME}}",
"successMessage": "你已成功連接到 {{APP_NAME}} 帳戶。"
}
}
1 change: 1 addition & 0 deletions locales/lang/ar-DZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "العربية (الجزائر)"
}
1 change: 1 addition & 0 deletions locales/lang/ar-MA.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "العربية (المغرب)"
}
1 change: 1 addition & 0 deletions locales/lang/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "العربية (السعودية)"
}
1 change: 1 addition & 0 deletions locales/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "English"
}
1 change: 1 addition & 0 deletions locales/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "Español"
}
1 change: 1 addition & 0 deletions locales/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "Français"
}
1 change: 1 addition & 0 deletions locales/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "日本語"
}
1 change: 1 addition & 0 deletions locales/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "Português"
}
1 change: 1 addition & 0 deletions locales/lang/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
"name": "简体中文"
}
Loading

0 comments on commit a2eeb25

Please sign in to comment.