Skip to content

feat(i18n): add Traditional Chinese (zh-TW) translation - #824

Open
Dwkobistar wants to merge 1 commit into
mediago-dev:masterfrom
Dwkobistar:i18n/add-zh-TW
Open

Dwkobistar wants to merge 1 commit into
mediago-dev:masterfrom
Dwkobistar:i18n/add-zh-TW

Conversation

@Dwkobistar

Copy link
Copy Markdown

feat(i18n): add Traditional Chinese (zh-TW) translation

Summary

Adds Traditional Chinese (zh-TW) as a first-class language across MediaGo,
following TRANSLATION.md. The locale is
registered end-to-end: main app, Electron main process, settings dropdown,
browser extension, embedded player and Go Core backend messages.

What's included

New translation resources

  • packages/common/src/i18n/resources/zh-TW.ts — 481 strings (full main-app
    catalog), translated into idiomatic Taiwan Mandarin.
  • packages/mediago-extension/src/i18n/resources/zh-TW.ts — extension catalog.
  • packages/mediago-extension/public/_locales/zh_TW/messages.json — Chrome /
    Edge extension name, description and tooltip.
  • apps/player-ui/src/i18n/index.ts — zh-TW catalog for the embedded player.
  • apps/core/internal/i18n/i18n.go — zh-TW catalog for backend messages.

Registration & resolution

  • resources/index.ts, config.ts, i18n/index.ts, types/index.ts — new
    locale in i18nResources, SUPPORTED_LANGUAGES, ResolvedAppLanguage and
    the AppLanguage enum.
  • setting-sections.tsx — new "繁體中文" option in Settings → Language.
  • app-language.ts / resolveAppLanguage — zh-TW, zh-Hant, zh-HK and
    zh-MO system locales now resolve to zh-TW; zh / zh-CN still resolve
    to Simplified Chinese.
  • Extension: resources/index.ts, language.ts, shared/types.ts,
    bootstrap.ts, LanguageCard.tsx — same resolution logic and a new radio
    option on the options page.
  • Player UI & Go Core: added zh-TW to the language union / matcher.
  • Added traditionalChinese (and options.language.zhTW for the extension)
    to every existing catalog, as required by TRANSLATION.md, so the
    language picker renders correctly in all languages.

Translation notes

  • Base text is the existing, reviewed Simplified Chinese catalog, converted
    with OpenCC s2twp and then hand-polished for Taiwan usage, e.g.
    影片 / 設定 / 預設 / 檔案 / 資料夾 / 伺服器 / 網路 / 偵測 / 匯入 /
    批次 / 快取 / 解析度 / 重新整理 / 系統匣 / 分頁 / 用戶端.
  • All keys, {{...}} / {name} placeholders and %s format tokens are
    preserved verbatim (verified programmatically: 0 placeholder mismatches).
  • Product names and protocols (MediaGo, BBDown, yt-dlp, m3u8,
    Docker, Schema, MCP, health_check) are left untranslated.
  • Long template strings (e.g. the MCP agent-config prompt) are translated too.

Verification

  • Key parity: en = 481, zh = 481, zh-TW = 482 (the extra key is the new
    traditionalChinese language name). No missing or extra keys.
  • Placeholder parity against the English source: 0 mismatches.
  • No Simplified-Chinese-only characters remain in the new zh-TW values.
  • All generated TypeScript files parse cleanly with esbuild.
  • messages.json is valid JSON.

Notes for reviewers

task check / the live-preview screenshots requested in TRANSLATION.md
were not run because this contribution was prepared without a full local
toolchain (Node 24 + Go 1.27 + the pinned runtime binaries). Happy to run
one check and attach Settings → Language and download-list screenshots if
a maintainer wants them before merging.

Thanks for maintaining MediaGo! 🌍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant