open-code-review icon indicating copy to clipboard operation
open-code-review copied to clipboard

Add i18n support for the VS Code extension

Open MuoDoo opened this issue 5 months ago • 0 comments

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.json

    • OCR: 开始代码审查
    • OCR: 取消审查
    • OCR: 打开配置
    • 应用
    • 忽略
    • 误报
  • extensions/vscode/src/webview/views/RunningView.tsx

    • 审查日志
    • 取消
  • extensions/vscode/src/webview/views/ConfigView.tsx

    • 模型配置
    • 环境检测
  • extensions/vscode/src/webview/App.tsx

    • title="模型配置"

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.json into package.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.l10n API where applicable.

Alternatives Considered

No response

Affected Area

Other

Additional Context

No response

MuoDoo avatar Jun 24 '26 08:06 MuoDoo