Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/chrome/src/ui/locales/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ export default {
'st.display.always_allow_api_mutations.desc': "允许 WebBrain 通过 fetch_url 或 research_url 使用 POST、PUT、PATCH 和 DELETE,无需在每个对话中输入 /allow-api。仍会遵循 UI 优先指引和确认检查。默认关闭。",
'st.display.api_mutation_observer.label': 'API 变更观察器',
'st.display.api_mutation_observer.desc': '观察同标签页中的 XHR/fetch 请求 URL 和方法,以便 WebBrain 可以检测重复的界面操作并建议 API 快捷模式。默认关闭;仅在调查快捷行为或延迟时启用。',
'st.display.openai_ask_streaming.label': "? Ask ????????",
'st.display.openai_ask_streaming.desc': "? Ask ???????????????????????????Act?Dev??????? Continue ????????????????",
'st.display.openai_ask_streaming.label': '在 Ask 模式中流式显示回复',
'st.display.openai_ask_streaming.desc': '对于支持的提供商,在 Ask 模式中随内容到达显示文本。中断的流会显示提示,并自动以非流式方式重试一次;提供商/API 错误仍会显示。工具调用会等待流完成;ActDev、计划任务、云端和 Continue 运行保持非流式。默认开启。',
'st.display.plan_before_act.label': '在执行前规划',
'st.display.plan_before_act.desc': "Act 和 Dev 模式在使用工具前始终执行结构化意图检查。尝试(默认)还会生成完整计划,但在简短跟进中可复用最近批准的计划;严格模式每轮都生成完整计划。如果意图或计划仍无效,尝试模式会再试一次,然后显示警告并继续以 Act 模式运行;严格模式会在使用工具前停止。",
'st.display.plan_before_act.try': '尝试规划(默认)',
Expand Down
4 changes: 2 additions & 2 deletions src/firefox/src/ui/locales/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ export default {
'st.display.always_allow_api_mutations.desc': "允许 WebBrain 通过 fetch_url 或 research_url 使用 POST、PUT、PATCH 和 DELETE,无需在每个对话中输入 /allow-api。仍会遵循 UI 优先指引和确认检查。默认关闭。",
'st.display.api_mutation_observer.label': 'API 变更观察器',
'st.display.api_mutation_observer.desc': '观察同标签页中的 XHR/fetch 请求 URL 和方法,以便 WebBrain 可以检测重复的界面操作并建议 API 快捷模式。默认关闭;仅在调查快捷行为或延迟时启用。',
'st.display.openai_ask_streaming.label': "? Ask ????????",
'st.display.openai_ask_streaming.desc': "? Ask ???????????????????????????Act?Dev??????? Continue ????????????????",
'st.display.openai_ask_streaming.label': '在 Ask 模式中流式显示回复',
'st.display.openai_ask_streaming.desc': '对于支持的提供商,在 Ask 模式中随内容到达显示文本。中断的流会显示提示,并自动以非流式方式重试一次;提供商/API 错误仍会显示。工具调用会等待流完成;ActDev、计划任务、云端和 Continue 运行保持非流式。默认开启。',
'st.display.plan_before_act.label': '在执行前规划',
'st.display.plan_before_act.desc': "Act 和 Dev 模式在使用工具前始终执行结构化意图检查。尝试(默认)还会生成完整计划,但在简短跟进中可复用最近批准的计划;严格模式每轮都生成完整计划。如果意图或计划仍无效,尝试模式会再试一次,然后显示警告并继续以 Act 模式运行;严格模式会在使用工具前停止。",
'st.display.plan_before_act.try': '尝试规划(默认)',
Expand Down
24 changes: 24 additions & 0 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -35650,6 +35650,30 @@ test('all locales cover English keys and preserve interpolation placeholders', a
}
});

test('zh Ask-streaming setting copy is not damaged/mojibake placeholder text', async () => {
// Regression test for the corruption fixed by PR #2949: 'st.display.openai_ask_streaming.label'/'.desc'
// in zh.js had shipped as literal runs of '?' (e.g. "? Ask ????????") instead of translated Chinese text.
// The generic locale-parity test above only checks key presence and {placeholder} token parity, so a
// value that is entirely '?' characters (zero placeholders, same as its English source) passes it
// trivially and would not have caught this. This check is intentionally scoped to zh only — several
// other locales (ar, bn, fa, he, hi, ja, ko, ru, th, uk) have the identical unfixed corruption for this
// same key today and are tracked separately rather than failing this PR's build.
for (const [label, localeDir] of [
['chrome', 'src/chrome/src/ui/locales'],
['firefox', 'src/firefox/src/ui/locales'],
]) {
const dir = path.join(ROOT, localeDir);
const zh = (await import('file://' + path.join(dir, 'zh.js').replace(/\\/g, '/'))).default;
for (const key of ['st.display.openai_ask_streaming.label', 'st.display.openai_ask_streaming.desc']) {
assert.doesNotMatch(
String(zh[key]),
/\?{4,}/,
`${label}/zh.js: ${key} contains damaged/mojibake placeholder text`,
);
}
}
});

test('Apocalypse Mode translation blocks cover every canonical key with matching placeholders in all 22 locales', async () => {
const apocalypseCopy = (await import(
pathToFileURL(path.join(ROOT, 'src/chrome/src/ui/locales/apocalypse-copy.mjs')).href
Expand Down
Loading