orca-zh-tw-installer 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +40 -0
- package/orca_zh_TW_translation.json +14 -1
- package/package.json +1 -1
- package/zh-TW-nested.cjs.js +16 -0
- package/zh-TW-nested.js +15 -0
package/index.js
CHANGED
|
@@ -197,6 +197,45 @@ function patchKeybindingTitles(p, translateFn) {
|
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
// ── 選項清單標籤本地化 ─────────────────────────────────────────────────
|
|
201
|
+
// Orca 用 { id: "x", label: "English" } 描述選項清單,label 全是寫死的英文:
|
|
202
|
+
// DEFAULT_WORKSPACE_STATUSES 側邊欄/看板的狀態
|
|
203
|
+
// *_THINKING_LEVELS 推理強度與模型模式
|
|
204
|
+
//
|
|
205
|
+
// 只翻「通用形容詞」,模型與產品名一律保留英文(Claude、Sonnet、Cursor、
|
|
206
|
+
// Kimi、GitHub Copilot、GPT-5 Mini、Antigravity、VS Code、Amp 的 Smart/
|
|
207
|
+
// Rush、Cursor 的 Large/Deep 都不動)。
|
|
208
|
+
//
|
|
209
|
+
// 以 (id, label) 成對比對而非只看 id:同一個 id 在不同陣列裡可能是別的東西,
|
|
210
|
+
// 成對比對才能確定是我們認得的那一個。
|
|
211
|
+
const OPTION_LABELS = {
|
|
212
|
+
'todo|Todo': '待處理',
|
|
213
|
+
'in-progress|In progress': '進行中',
|
|
214
|
+
'in-review|In review': '待審查',
|
|
215
|
+
'completed|Done': '已完成',
|
|
216
|
+
'low|Low': '低',
|
|
217
|
+
'medium|Medium': '中',
|
|
218
|
+
'high|High': '高',
|
|
219
|
+
'xhigh|Extra High': '極高',
|
|
220
|
+
'max|Max': '最大',
|
|
221
|
+
'off|Off': '關',
|
|
222
|
+
'on|On': '開',
|
|
223
|
+
'auto|Auto': '自動',
|
|
224
|
+
'default|Config default': '設定檔預設',
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
function patchOptionLabels(p, translateFn) {
|
|
228
|
+
p.patch('選項清單標籤改走 i18n',
|
|
229
|
+
c => c.includes('optionLabel.in-progress'),
|
|
230
|
+
/\{(\s*)id: "([a-z0-9-]+)",(\s*)label: "([^"]{1,40})"/g,
|
|
231
|
+
(m, s0, id, s1, label) => {
|
|
232
|
+
const en = OPTION_LABELS[`${id}|${label}`];
|
|
233
|
+
if (!en) return m; // 不在白名單就整段不動
|
|
234
|
+
return `{${s0}id: ${JSON.stringify(id)},${s1}get label() { `
|
|
235
|
+
+ `return ${translateFn}("optionLabel.${id}", ${JSON.stringify(label)}); }`;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
200
239
|
function patchNativeMenus(p) {
|
|
201
240
|
p.patch('原生選單:為無 label 的 role 注入譯文',
|
|
202
241
|
c => c.includes('nativeMenu.selectAll'),
|
|
@@ -321,6 +360,7 @@ async function patch() {
|
|
|
321
360
|
// 「設定 → 快速鍵」顯示的是 renderer 這份定義,所以只改這裡。
|
|
322
361
|
// main process 也有一份,但那份不用於顯示,動它只增加風險。
|
|
323
362
|
patchKeybindingTitles(rp, 'translate');
|
|
363
|
+
patchOptionLabels(rp, 'translate');
|
|
324
364
|
rp.save();
|
|
325
365
|
|
|
326
366
|
console.log('📂 4/6 正在植入繁體中文字典 (ESM + CJS 兩種格式)...');
|
|
@@ -11289,5 +11289,18 @@
|
|
|
11289
11289
|
"keybinding.terminal.closePane": "關閉使用中的窗格",
|
|
11290
11290
|
"keybinding.terminal.splitRight": "向右分割終端機",
|
|
11291
11291
|
"keybinding.terminal.splitDown": "向下分割終端機",
|
|
11292
|
-
"keybinding.terminal.switchInputSource": "切換輸入來源/語言(原生)"
|
|
11292
|
+
"keybinding.terminal.switchInputSource": "切換輸入來源/語言(原生)",
|
|
11293
|
+
"optionLabel.todo": "待處理",
|
|
11294
|
+
"optionLabel.in-progress": "進行中",
|
|
11295
|
+
"optionLabel.in-review": "待審查",
|
|
11296
|
+
"optionLabel.completed": "已完成",
|
|
11297
|
+
"optionLabel.low": "低",
|
|
11298
|
+
"optionLabel.medium": "中",
|
|
11299
|
+
"optionLabel.high": "高",
|
|
11300
|
+
"optionLabel.xhigh": "極高",
|
|
11301
|
+
"optionLabel.max": "最大",
|
|
11302
|
+
"optionLabel.off": "關",
|
|
11303
|
+
"optionLabel.on": "開",
|
|
11304
|
+
"optionLabel.auto": "自動",
|
|
11305
|
+
"optionLabel.default": "設定檔預設"
|
|
11293
11306
|
}
|
package/package.json
CHANGED
package/zh-TW-nested.cjs.js
CHANGED
|
@@ -14025,6 +14025,21 @@ const zhTW = {
|
|
|
14025
14025
|
"splitDown": "向下分割終端機",
|
|
14026
14026
|
"switchInputSource": "切換輸入來源/語言(原生)"
|
|
14027
14027
|
}
|
|
14028
|
+
},
|
|
14029
|
+
"optionLabel": {
|
|
14030
|
+
"todo": "待處理",
|
|
14031
|
+
"in-progress": "進行中",
|
|
14032
|
+
"in-review": "待審查",
|
|
14033
|
+
"completed": "已完成",
|
|
14034
|
+
"low": "低",
|
|
14035
|
+
"medium": "中",
|
|
14036
|
+
"high": "高",
|
|
14037
|
+
"xhigh": "極高",
|
|
14038
|
+
"max": "最大",
|
|
14039
|
+
"off": "關",
|
|
14040
|
+
"on": "開",
|
|
14041
|
+
"auto": "自動",
|
|
14042
|
+
"default": "設定檔預設"
|
|
14028
14043
|
}
|
|
14029
14044
|
};
|
|
14030
14045
|
exports.default = zhTW;
|
|
@@ -14041,3 +14056,4 @@ exports.dashboard = zhTW.dashboard;
|
|
|
14041
14056
|
exports.nativeMenu = zhTW.nativeMenu;
|
|
14042
14057
|
exports.keybindingGroup = zhTW.keybindingGroup;
|
|
14043
14058
|
exports.keybinding = zhTW.keybinding;
|
|
14059
|
+
exports.optionLabel = zhTW.optionLabel;
|
package/zh-TW-nested.js
CHANGED
|
@@ -14023,5 +14023,20 @@ export default {
|
|
|
14023
14023
|
"splitDown": "向下分割終端機",
|
|
14024
14024
|
"switchInputSource": "切換輸入來源/語言(原生)"
|
|
14025
14025
|
}
|
|
14026
|
+
},
|
|
14027
|
+
"optionLabel": {
|
|
14028
|
+
"todo": "待處理",
|
|
14029
|
+
"in-progress": "進行中",
|
|
14030
|
+
"in-review": "待審查",
|
|
14031
|
+
"completed": "已完成",
|
|
14032
|
+
"low": "低",
|
|
14033
|
+
"medium": "中",
|
|
14034
|
+
"high": "高",
|
|
14035
|
+
"xhigh": "極高",
|
|
14036
|
+
"max": "最大",
|
|
14037
|
+
"off": "關",
|
|
14038
|
+
"on": "開",
|
|
14039
|
+
"auto": "自動",
|
|
14040
|
+
"default": "設定檔預設"
|
|
14026
14041
|
}
|
|
14027
14042
|
};
|