mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
i18n: keep 並 before 道路, 道歉 and 道理 in zh-Hant
The 並道 → 併道 correction replaced the substring anywhere, so a zh-CN string where 并 means "and" and 道 starts the next word would turn into 併道路 or 併道歉. It now skips 道路, 道歉 and 道理. The three current entries (lane merging) convert as before; zh-Hant.json does not change.
This commit is contained in:
1 parent
4c5fbd3223
commit
3822ee9f00
3 files changed
+9
-2
No files matched your search
@@ -10,7 +10,7 @@ npm run i18n -- --zh-hant # rewrite zh-Hant.json from zh-CN.json
|
||||
|
||||
`npm test` fails when `zh-Hant.json` differs from the conversion of `zh-CN.json`, naming the entry, and `npm run i18n -- --missing zh-Hant` points to this command instead of printing a template.
|
||||
|
||||
The command converts with OpenCC `s2tw` ([opencc-js](https://github.com/nk2028/opencc-js), `cn` → `tw`), which changes characters only. Never `s2twp`: it also swaps in Taiwan vocabulary (影片, 伺服器, 載入, 圖示), which this catalog does not use. After the conversion it fixes the characters OpenCC picks wrongly here: 年曆史 → 年歷史, 下遊 → 下游, 並道 → 併道, 發佈 → 發布, 公佈 → 公布, 控制檯 → 控制台, and 周 → 週 where it means a week (1 週/秒). The list is `ZH_HANT_CORRECTIONS` in `scripts/i18n.mjs`; when the conversion picks another wrong character, add the pair there and run the command.
|
||||
The command converts with OpenCC `s2tw` ([opencc-js](https://github.com/nk2028/opencc-js), `cn` → `tw`), which changes characters only. Never `s2twp`: it also swaps in Taiwan vocabulary (影片, 伺服器, 載入, 圖示), which this catalog does not use. After the conversion it fixes the characters OpenCC picks wrongly here: 年曆史 → 年歷史, 下遊 → 下游, 並道 → 併道 (not in 並道路, 並道歉, 並道理), 發佈 → 發布, 公佈 → 公布, 控制檯 → 控制台, and 周 → 週 where it means a week (1 週/秒). The list is `ZH_HANT_CORRECTIONS` in `scripts/i18n.mjs`; when the conversion picks another wrong character, add the pair there and run the command.
|
||||
|
||||
An entry `zh-CN` keeps in English on purpose needs the same line under `zh-Hant` in `src/i18n/same-as-english.json`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user