chore(idea): translate the Chinese comments in providers/ and HostStrings.kt

Author: lizhengfeng101Created Sep 18, 2026Updated Sep 18, 2026
Labelsgood first issuehelp wanted

Part of #1419. Ready to start — no open pull request touches extensions/idea/.

Scope

93 flagged lines across 3 files.

Lines File Note
44 .../idea/providers/CommentService.kt all comments
28 .../idea/providers/CommentAnchor.kt all comments
21 .../idea/model/HostStrings.kt comments only

HostStrings.kt needs care

Its 68 flagged lines are two different things:

  • 21 comment lines — translate these.
  • 47 ZH_CN map entries (lines 81–142) — these are translated UI copy and must stay Chinese. It is the host-side mirror of the webview i18n table, and its ext.* keys and values are meant to match the frontend.

Once the 21 comments are translated, add a narrow exemption for the file so the 47 entries stay covered after #1424 removes the broad one:

go
{"extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/model/HostStrings.kt", "host-side mirror of the webview i18n table"},

Order matters: translate first, then add the exemption. Adding it first would let the untranslated comments through unnoticed.

Per-line allow-non-english: markers are not appropriate here — 47 of them would be pure noise. The whole-file exemption is honest once the file holds no Chinese comments.

Done when

  • Temporarily dropping the extensions/idea/ exemption reports nothing under providers/, and reports HostStrings.kt only if its narrow exemption is also removed.
  • ./gradlew test -PskipFrontend=true passes.

Source: alibaba/open-code-review