feat: add Traditional Chinese (zh-tw) locale — README, docs, and 20 chapter READMEs#219
Open
MakiDevelop wants to merge 10 commits into
Open
feat: add Traditional Chinese (zh-tw) locale — README, docs, and 20 chapter READMEs#219MakiDevelop wants to merge 10 commits into
MakiDevelop wants to merge 10 commits into
Conversation
Add Traditional Chinese with Taiwan phrasing as a new locale alongside existing en/zh/ja. All docs are converted from Simplified Chinese via OpenCC s2twp (智能体→智慧體, 循环→迴圈, 代码→程式碼, 内存→記憶體, etc). Changes: - Add docs/zh-tw/ (36 files, converted from docs/zh/ via opencc -c s2twp.json) - Add web/src/i18n/messages/zh-tw.json (UI strings) - Register zh-tw in i18n provider, root layout, locale switcher, and static params generator - Update extract-content.ts to detect zh-tw subdirectory - Widen DocContent.locale union to include "zh-tw" UI chrome for zh-tw falls back to English where inline literal copy objects aren't yet translated (same behaviour as ja currently). Main doc body content is fully Traditional Chinese. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@MakiDevelop is attempting to deploy a commit to the crazyboym's projects Team on Vercel. A member of the Team first needs to authorize it. |
- 四語系 OG 圖(en/zh/zh-tw/ja,Gemini 3 Pro 生成,1200x630) - layout.tsx 按 locale 對應 og:image,補 metadataBase / openGraph / twitter card - 字體大小切換小/中/大(html font-size 14/16/18px,整站 rem 連動) - Header desktop + mobile menu 各加一組「A A A」選擇器 - localStorage 持久化 + <head> inline script 避免 FOUC Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36897b1 to
d882d01
Compare
- 加 web/public/hero-claude.webp(1536x1024 JPEG → 1280 寬 webp q85, 125K) - [locale]/page.tsx hero 區塊頂部插入 img,max-w-3xl、rounded-2xl、fetchPriority=high
KV.{jpeg,png,webp} 為處理前源檔,最終版以 web/public/hero-*.webp
形式入版(已存在)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
衝突解決策略: - README.md / README-zh.md / README-ja.md:採上游版(上游新增 s01-s20 章節說明) - docs/zh/s01-the-agent-loop.md / s03-todo-write.md:採上游版(上游重寫,原 fix 已不適用) 上游帶入: - 20 個 sNN_*/ 章節目錄(code.py + README en/zh/ja + SVG 圖) - docs/zh 結構重組(刪 s00*/s02a-b/s07-permission 等舊章,新增 s07-task/s08-bg/s09-team 等) - docs/en / docs/ja 同步改寫 zh-tw 對齊:下個 commit 處理 docs/zh-tw 結構與翻譯。
Stage A:機械化簡轉繁 - docs/zh-tw/ 全 36 檔:依新版 docs/zh 用 OpenCC s2twp 重新轉換 (舊版繁中內容已不適用,上游 s01/s03 等大幅精簡) - 新增 README-zh-tw.md(top-level,from README-zh.md) - 新增 20 個 sNN_*/README.zh-tw.md(s01-s20,from sNN/README.md 簡中版) - 全部語言切換連結加上「繁中」項 OpenCC 已覆蓋 90% 在地化(軟體/資料/呼叫/檔案/影片/佇列/函式 等)。 剩餘 10% 片語級在地化下個 commit 由 Gemini review 補強。
npm run extract 產出,4 locales × 36 docs = 144 條目。
Gemini 3.1 Pro 掃描全 57 個 zh-tw 檔,找出 OpenCC 漏掉的台灣慣用詞 50 條。
Maki review 後分流:
Applied (44 條,直接套用):
- 幹活 → 做事 / 工作 / 執行任務
- 倉庫 → 專案、手搓 → 實作
- 流水線 → 管線、鏈路 → 路徑、槽位 → 插槽
- 落盤/寫盤 → 寫入磁碟 / 存檔
- 郵箱 → 信箱、收件箱 → 收件匣
- 報錯 → 錯誤訊息、粘 → 貼、貼上回 → 貼回
- 控制面 → 控制平面、收口 → 收尾
- 路子 → 方式、騰空間 → 騰出空間
- 構建 → 建構、章 → 章節、理清 → 釐清
Modified (3 條,Maki override):
- 對話框 → 對話視窗(非 Gemini 的「對話框」)
- 拖放 → 拖曳(非 Gemini 的「拖放」)
- 「水管工→工程師」patch 拆解:保留水管工 + 程式設計師,只採「意淫→幻想」
Rejected (3 條):
- 線上 → 在線(反向錯誤,台灣是「線上」)
- 相容分支 → 相容分支(no-op)
- 提示詞水管工式 → 提示詞工程師式(保留原作 plumber 比喻)
未套用 (4 條 errors):因前一條 patch 已改字串造成 unique-match 失敗,
不重要——前 patch 已涵蓋等價修改。
Pipeline:briefing → gemini --approval-mode auto_edit → JSON patches
→ Python apply (unique-match check) → git diff review → commit
Evidence: ~/Documents/agent-council/2026-05-21-zh-tw-stageB/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
新增 Traditional Chinese (Taiwan, zh-tw) locale,涵蓋三個層次:
README-zh-tw.md(top-level,與 README / README-zh / README-ja 並列)docs/zh-tw/(36 個章節文件,對齊現有docs/zh/結構)sNN_*/README.zh-tw.md(s01-s20,與每章 README / README.en / README.ja 並列)web/配套:scripts/extract-content.ts已支援 zh-tw,build 後產生 244 個 static page(含 zh-tw 路由)Why zh-tw separately from zh?
繁體中文(台灣)與簡體中文用詞差異不只字形:
純字形轉換(OpenCC
s2t)對 Taiwan reader 仍有閱讀阻力。本 PR 用 OpenCC
s2twp(含台灣慣用詞庫)作 baseline,再經 Gemini review 補強片語級在地化。Translation pipeline
s2twpOverride / reject cases reviewed by human maintainer.
Evidence:commit messages 中有完整 patch 分流記錄。
Files
README-zh-tw.md— 新增docs/zh-tw/*.md— 新增 36 檔s{01..20}_*/README.zh-tw.md— 新增 20 檔README.md/README-zh.md/README-ja.md— 語言切換器加「繁中」連結s{01..20}_*/README.md/README.en.md/README.ja.md— 同上web/scripts/extract-content.ts— 已包含zh-tw在 locale 列表web/src/data/generated/docs.json— 重建後含 144 筆(4 locales × 36 docs)web/src/i18n/messages/zh-tw.json— 已存在Test plan
npm run extract產出 docs.json 含 zh-tw 36 條npm run build通過,static export 244 pages(含/zh-tw/*路由)/zh-tw/s01//zh-tw/docs/glossary/回 200 + 含繁中內容Maintenance commitment
本 PR 作者(@MakiDevelop)願意維護 zh-tw locale 跟進未來 upstream 變動。
若 maintainer 不希望增加 zh-tw 維護負擔,本 PR 可改為僅在 fork 維護,不一定要 merge。
🤖 Generated with Claude Code