Add localization (i18n) support, starting with Simplified Chinese (zh-cn)

Aperta
#648 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@linghengqian ci sta già lavorando.

Dal 5/11/2026.

  • #650 di @linghengqian — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript, vscode

Direzione di ricerca

Start with extensions/vscode-containers/package.json, extension/package.nls.json, and the existing l10n.t() calls in extensions/vscode-containers/src and packages/vscode-docker-registries/src. Check how Dev Containers structures its localization files and how the registry package is bundled; then define the extraction and translation workflow for zh-cn and cover the listed remaining literals. Done means manifest and runtime strings load in Simplified Chinese and new runtime strings can be exported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The current release of Container Tools ships no translations. With the Chinese (Simplified) Language Pack, VS Code itself is in Chinese, but everything this extension adds (view and command names, setting descriptions, quick picks, notifications, error messages) is English.

I'd like to request localization support, with Simplified Chinese (zh-cn) first. Other VS Code display languages could follow.

What I checked

  • The current Marketplace build, ms-azuretools.vscode-containers 2.5.3, contains extension/package.nls.json (English, 369 keys) and no other localization files. There is no package.nls.<locale>.json, no l10n/ folder, and no "l10n" field in package.json, so VS Code has nothing to load for any non-English display language.
  • The source is mostly prepared for it. At cb1dcf0 (main), package.json uses 367 %key% placeholders defined in package.nls.json, and the shipped code has 446 l10n.t() calls in 145 files (extensions/vscode-containers/src and packages/vscode-docker-registries/src, tests excluded). .github/skills/code-review/rubric.md also asks that every user-facing string be localized.
  • I found no @vscode/l10n-dev dependency, no script that exports bundle.l10n.json, and no translated files in the repo.
  • Dev Containers (ms-vscode-remote.remote-containers 0.471.0) is the closest comparison. It ships package.nls.<locale>.json and l10n/bundle.l10n.<locale>.json for 13 languages, including zh-cn and zh-tw, and sets "l10n": "./l10n".
  • I searched issues, pull requests and discussions in this repo for "i18n", "l10n", "localization", "translation" and "Chinese" and found no existing request. The closest are #582 and #583, which moved the container client labels into package.nls.json so they can be localized.

Request

  1. Ship translated resources: package.nls.<locale>.json for the manifest and l10n/bundle.l10n.<locale>.json for runtime strings, with "l10n": "./l10n" in package.json. Start with zh-cn.
  2. Add an extraction step (for example @vscode/l10n-dev export) so new strings reach the bundle. It needs to cover packages/vscode-docker-registries, which is bundled from source.
  3. Wrap the strings that are still literals. A few I noticed at cb1dcf0:
    • extensions/vscode-containers/package.json: the debugger label and the launch snippet labels and descriptions
    • extensions/vscode-containers/src/utils/multiSelectNodes.ts:51
    • extensions/vscode-containers/src/commands/registries/deleteRemoteImage.ts:41
    • extensions/vscode-containers/src/commands/registries/azure/createAzureRegistry.ts:57

Questions

  • Is localization planned? Could Container Tools use the same Microsoft localization process as Dev Containers?
  • If not, would you accept community translations as pull requests, and in what form (files, review process)?
Lingua principale
TypeScript
Stelle
147
Fork
93
Merge medio
9h 16m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-containers

Tutte le issue di microsoft/vscode-containers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.