Skip to content

i18n(zh): complete Simplified Chinese translations and localize the previously hardcoded copy - #1571

Merged
tyron12233 merged 1 commit into
tyron12233:mainfrom
conch-6:zh-localization
Sep 2, 2026
Merged

i18n(zh): complete Simplified Chinese translations and localize the previously hardcoded copy#1571
tyron12233 merged 1 commit into
tyron12233:mainfrom
conch-6:zh-localization

Conversation

@conch-6

@conch-6 conch-6 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What

Two related halves, both around Simplified Chinese support:

1. Fill the gaps in values-zh.

ide-ui was missing ~350 strings (en has 1458, zh had 1139), agent-ui was missing 2, and vcs-ui had no zh file at all — now filled in. Existing translations are left untouched, and everything is verified 1:1 against values/ (key parity + placeholder parity via a script). Missing keys fall back to English anyway, but now nothing on screen has to.

2. Extract the copy that was hardcoded in composables.

A bunch of UI text never went through the resource files at all, so translations could never reach it:

  • the Explore screen's empty/sparse states (hero, publishing steps, pitch band, ghost shelves…)
  • the built-in UI actions (the "More" menu rows and the palette's UI-navigation commands)

These now live in values/strings.xml (original English verbatim) with zh translations, following the existing key style.

The More-menu actions are a special case: they're contributed through the plugin API (ide-ui-api) as plain strings, and third-party plugins have no access to Compose resources. So I followed the same override pattern as SettingsLocalization — a new UiActionLocalization.kt maps built-in action ids to resources at render time and falls back to the plugin-supplied string for unknown ids, so third-party plugin actions keep working unchanged.

To call stringResource, five small helpers became @Composable (defaultPublishSteps, emptyGhostNote, ghostSpec, sparseBadge, pitchHeadline) — no behavior changes otherwise.

Notes

  • app_name stays "CodeAssist" (brand name, not translated)
  • Brand and technical names (Gradle, Logcat, BOM…) stay in English inside the translations
  • Author comments are untouched; new comments follow the existing style

Happy to adjust any wording — and if you'd rather split this into two PRs (pure translation fill vs. the extraction), say the word.

Two related halves, both verified 1:1 against values/ (key parity and
placeholder parity):

- Fill the ~350 string/plural gaps in ide-ui and agent-ui values-zh; vcs-ui
  had no zh file at all and gets one covering all 175 strings. Existing
  translations are left untouched.
- The Explore screen (empty/sparse states) and the built-in UI actions (the
  More menu) kept their copy inline, so translations could never reach them:
  extract it into values/strings.xml (original English verbatim) with zh
  translations, following the existing key style.
- Add UiActionLocalization.kt: the built-in actions are contributed through
  the plugin API (ide-ui-api) as plain strings, so — same override pattern as
  SettingsLocalization — the UI maps built-in action ids to resources at
  render time; third-party plugin actions fall through untouched.
- Five helpers become @composable (defaultPublishSteps, emptyGhostNote,
  ghostSpec, sparseBadge, pitchHeadline) to call stringResource; no behavior
  changes.
@tyron12233
tyron12233 merged commit 98b84fc into tyron12233:main Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants