Add i18n support for the VS Code extension
Problem Statement
The VS Code extension currently appears to have no proper internationalization support.
From the repository history, the extension was initially added in commit dc4bf69 with the message:
feat(vscode): add VSCode extension for AI code review with security fixes
At that point, the extension already contained hardcoded Chinese UI strings in both package.json contributions and WebView source files.
Examples include:
-
extensions/vscode/package.jsonOCR: 开始代码审查OCR: 取消审查OCR: 打开配置应用忽略误报
-
extensions/vscode/src/webview/views/RunningView.tsx审查日志取消
-
extensions/vscode/src/webview/views/ConfigView.tsx模型配置环境检测
-
extensions/vscode/src/webview/App.tsxtitle="模型配置"
There are English and Simplified Chinese README files, but the extension UI itself does not seem to use VS Code’s standard localization mechanism, such as package.nls.json, package.nls.zh-cn.json, or vscode.l10n.
Expected behavior
The VS Code extension should support internationalization so that UI strings can be displayed according to the user’s VS Code language setting.
Proposed Solution
- Move extension contribution strings from
package.jsonintopackage.nls.json. - Add localized resources such as
package.nls.zh-cn.json. - Replace hardcoded WebView and extension UI strings with a localization layer.
- Consider using VS Code’s built-in
vscode.l10nAPI where applicable.
Alternatives Considered
No response
Affected Area
Other
Additional Context
No response