Skip to content

feat(i18n): add Traditional Chinese (zh-TW) locale - #1745

Merged
l0gicgate merged 5 commits into
lgse:mainfrom
a-lang:zh-tw-translation
Oct 18, 2026
Merged

l0gicgate merged 5 commits into
lgse:mainfrom
a-lang:zh-tw-translation

Conversation

@a-lang

@a-lang a-lang commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a full Traditional Chinese (zh-TW) locale to Strata, translated from the English source with Taiwan terminology (not converted from zh-CN). Implements the Option A routing decided in #1613: zh_TW, zh_HK, zh_MO, and zh-Hant… locales resolve to zh-TW; zh_CN, zh_SG, zh-Hans…, and bare zh stay on zh-CN. Also updates catalogs, counts/dates, desktop entry, typos config, tests, and docs.

Visual evidence

N/A — this is a non-visual i18n/catalog change; no UI layout or styling is modified. Language selector gains a 正體中文 entry.

How to test

  1. Build and run Strata, open Settings → General → Language, choose 正體中文, restart.
  2. Verify the UI renders in Traditional Chinese with Taiwan terminology.
  3. Set LANG=zh_TW.UTF-8 (or zh_HK/zh-Hant) and confirm auto-detect picks zh-TW; zh_CN stays Simplified.
  4. Run ./scripts/test-headless.py i18n::, language_, util::tests, ui::settings::tests::general, ui::settings::search::tests.

Expected result: all listed tests pass; UI fully translated with no missing keys or placeholders.

Related issue

Closes #1613

a-lang and others added 2 commits October 18, 2026 10:43
Add a full zh-TW locale translated from English with Taiwan terminology,

including main/messages catalogs, counts/dates entries, i18n routing

(Option A: zh_TW/zh_HK/zh_MO/zh-Hant -> zh-TW), desktop entry,

typos config, tests, and docs.

Closes lgse#1613
l0gicgate added a commit to lgse/strata-website that referenced this pull request Oct 18, 2026
Strata gains a zh-TW locale (lgse/strata#1745), bringing the interface
to 12 languages. List it after Simplified Chinese, matching the app's
own order and label, and update the FAQ and test count.
Lists join with 、 and durations drop the space between digits and Han,
as the zh-TW style notes require; the tests had expected Simplified
output for zh-TW counts and durations. Unlisted Chinese regions such as
zh_MY fall back to Simplified Chinese again instead of English.
The catalog coverage test requires every installer string in every
locale. The Bash installer now routes zh_TW, zh_HK, zh_MO and zh-Hant
to zh-TW, matching the application.
@l0gicgate

Copy link
Copy Markdown
Contributor

Thanks for the translation, @a-lang. The catalogs read well and have no Simplified characters. I merged main (8158e84, no conflicts) and pushed three fixes on top, because the submitted tests did not pass:

Fixes

  • Installer catalog (e0095137): catalogs_cover_all_languages_and_preserve_interpolation also checks data/locales/installer.json, and it failed with zh-TW missing. I added the 61 installer strings in Taiwan terminology, regenerated install.sh, and routed zh_TW/zh_HK/zh_MO/zh-Hant to zh-TW in its installer_locale to match the app. I also extended the installer locale test and the typos rule.
  • Templates vs. the zh-TW style notes (95c3d60a): lists were joined with , and durations had spaces (1 小時 2 分). Both contradicted the new doc paragraph and the tests. They now use 、 and 1小時2分. The tests had also expected Simplified output for zh-TW (3,000 个文件, 1小时2分); they now expect 3,000 個檔案 and 1小時2分. I removed the duplicate join_sentences_in("zh-TW", …) assertion: that function does not depend on the locale for full-width stops. I fixed two :/、 + space spacing slips and one 檔案管理器 → 檔案管理員 inconsistency.
  • Routing regression (95c3d60a): supported_locale returned None for Chinese regions outside the listed ones, so zh_MY fell back to English. It now uses Simplified Chinese for every non-Traditional variant, as before. I added zh_MO and zh_MY rows.
  • Docs (f864515c): rewrapped the AGENTS.md and preferences.md lines and dropped the font paragraph that repeated the existing font note. I also updated that note's sentence about auto-detected zh_TW forms.
  • cargo fmt reformatted the new search-test table, and the test comment now matches the real title (顯示 F1 快捷鍵按鈕, without 「」).

Local verification (scoped: catalogs, locale routing, installer)

  • ./scripts/test-headless.py -- i18n:: language_ util::tests ui::settings::tests::general ui::settings::tests::updates ui::settings::search::tests: 54 passed, 0 failed
  • python3 -m unittest scripts.test_installer: 55 passed. python3 scripts/installer_messages.py is up to date.
  • cargo fmt --all --check, cargo clippy --all-targets --all-features -- -D warnings, typos and git diff --check: all clean

Not changed

  • The language list in the Settings search test (("zh-CN", "语言")) still has no zh-TW row. This doesn't block merge.

CI for this fork is waiting for maintainer approval.

@l0gicgate
l0gicgate merged commit d390a66 into lgse:main Oct 18, 2026
7 of 9 checks passed
l0gicgate added a commit that referenced this pull request Oct 20, 2026
…ompat-followups

Resolves the catalog, services, preview test, context menu, theme and
typed-navigation conflicts, and adapts what main added since the fork to
this branch's rules:

- The user stylesheet (#1758) is watched through the monitors worker and
  re-read off the UI thread.
- The Diagnostics page (#1735) and the Integrations page (#1748) detect
  the package manager and resolve the terminal off the UI thread; the
  Run-in-terminal button spawns through the reaper closure.
- Connect to server (#1726) waits for a native path's asynchronous
  validation instead of pinning and closing at once.
- The pinned-places tests read the GTK bookmarks file through
  adapters::bookmarks after the settings writer settles.
- Traditional Chinese (#1745) gets the strings this branch adds.
@a-lang
a-lang deleted the zh-tw-translation branch November 10, 2026 03:28
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.

Proposal: Add Traditional Chinese (zh-TW) locale

2 participants