i18n: add Traditional Chinese (zh-TW)

Add a complete Taiwan Traditional Chinese catalog, locale selection,
Chinese readout formatting, translation notes and regression coverage.
Seed translations from #724 and #652 and adapt the zh-CN catalog.

Co-authored-by: caxer <[email protected]>
Co-authored-by: tbdavid2019 <[email protected]>
Co-authored-by: Enzo Abyie <[email protected]>
Co-authored-by: EDIT-Aeterna <[email protected]>
This commit is contained in:
committed 2026-10-23 22:52:48 +04:00
1 parent 8cdd184a90
commit 6b3e8bada3
16 files changed
+3070 -47

No files matched your search

+3 -3
View File
@@ -3583,7 +3583,7 @@ test:track` 43 tracking invariants · headless QA harnesses under
### Interface localization (October 2026)
Shipped locales: **en** (source and fallback), **es**, **ru** and **zh-CN**. The code lives in
Shipped locales: **en** (source and fallback), **es**, **ru**, **zh-CN** and **zh-TW**. The code lives in
`src/i18n/`. How to mark UI text: [`docs/I18N.md`](./I18N.md); translator workflow:
[`docs/TRANSLATORS.md`](./TRANSLATORS.md).
@@ -3594,8 +3594,8 @@ Shipped locales: **en** (source and fallback), **es**, **ru** and **zh-CN**. The
value). English has no catalog; every other locale is
`src/i18n/locales/<code>.json`, and a missing entry falls back to English.
- **Locale choice.** `?lang=` → stored choice (`gev:locale:v1`) →
`navigator.languages` → English. Chinese tags map to `zh-CN`; tags containing
`Hant`, `TW`, `HK` or `MO` are skipped. `?lang=` is not stored, and share links drop
`navigator.languages` → English. Chinese tags default to `zh-CN`; `Hant`, `TW`, `HK` and `MO`
select `zh-TW`. Explicit `Hans` selects `zh-CN` regardless of region. `?lang=` is not stored, and share links drop
it, so a recipient keeps their own language. The globe picker in the
bottom-right corner (`src/ui/localePicker.js`) stores the choice, drops
`?lang=` (keeps it only when storage is blocked) and reloads. It asks first
+2 -2
View File
@@ -1,6 +1,6 @@
# Translating God's Eye View
Shipped languages: **English** (source and fallback), **Spanish** (`es`), **Russian** (`ru`) and **Simplified Chinese** (`zh-CN`).
Shipped languages: **English** (source and fallback), **Spanish** (`es`), **Russian** (`ru`), **Simplified Chinese** (`zh-CN`) and **Traditional Chinese** (`zh-TW`).
## How it works
@@ -63,4 +63,4 @@ These are contracts, not copy: layer ids and registry keys, status enums and oth
## Language notes
Each language keeps its glossary, plural forms, units and style in its own file, `docs/translations/<code>.md`: [Spanish](./translations/es.md), [Russian](./translations/ru.md), [Simplified Chinese](./translations/zh-CN.md). Read it before translating, and add a term there when you settle on one.
Each language keeps its glossary, plural forms, units and style in its own file, `docs/translations/<code>.md`: [Spanish](./translations/es.md), [Russian](./translations/ru.md), [Simplified Chinese](./translations/zh-CN.md), [Traditional Chinese](./translations/zh-TW.md). Read it before translating, and add a term there when you settle on one.
+36
View File
@@ -0,0 +1,36 @@
# Traditional Chinese (`zh-TW`)
Catalog: `src/i18n/locales/zh-TW.json`. General rules: [TRANSLATORS.md](../TRANSLATORS.md).
Sources: caxer (#724), tbdavid2019 (#652), and the zh-CN catalog credited to abiyeenzo (#914) and EDIT-Aeterna (#979). The remaining entries were seeded with OpenCC s2twp and edited for Taiwan usage.
## Style
- Use Traditional characters and Taiwan terminology. Prefer short, neutral instructions: 「點選地圖」、「儲存金鑰」.
- Use full-width Chinese punctuation and 「」 for quotations. Keep `·`, `…`, provider names, codes and placeholders unchanged.
- Separate Chinese from Latin letters and numbers with a space: 「AIS 船舶」、「24 小時」. Keep unit symbols unchanged: km, m, km/h, m/s, kn, ft, MW, °, %.
- Chinese labels have no uppercase variant. Keep button labels short and avoid splitting short words across lines.
- Browser tags with Hant or TW/HK/MO select this Taiwan catalog. Explicit Hans selects Simplified Chinese, including Hans-TW. This is not a separate Hong Kong localization.
## Plurals
`Intl.PluralRules('zh-TW')` uses only `other`. Keep suitable measure words: 「{count} 架飛機」、「{count} 艘船」、「{count} 個金鑰」.
## Taiwan terminology
| English | Taiwan | Mainland |
| -------------------- | --------------------- | ------------------- |
| data / information | 資料 / 資訊 | 数据 / 信息 |
| file / folder | 檔案 / 資料夾 | 文件 / 文件夹 |
| settings / save | 設定 / 儲存 | 设置 / 保存 |
| API key / token | API 金鑰 / 權杖 | API 密钥 / 令牌 |
| live / load | 即時 / 載入 | 实时 / 加载 |
| camera / video | 攝影機 / 影片 | 摄像头 / 视频 |
| network / link | 網路 / 連結 | 网络 / 链接 |
| image / imagery | 圖像 / 影像 | 图像 / 影像 |
| click / double-click | 點選 / 按兩下 | 点击 / 双击 |
| response / timeout | 回應 / 逾時 | 响应 / 超时 |
| layer / data layer | 圖層 / 資料圖層 | 图层 / 数据图层 |
| cockpit / context | 駕駛艙 / 態勢 | 座舱 / 态势 |
| air quality | 空氣品質 | 空气质量 |
| transit / bikeshare | 大眾運輸 / 公共自行車 | 公共交通 / 共享单车 |