Provides comprehensive guidelines for translating and localizing Roo Code extension strings. Use when tasks involve i18n, translation, localization, adding new languages, or updating existing translation files. This skill covers both core extension (src/i18n/locales/) and WebView UI (webview-ui/src/i18n/locales/) localization.
Use this skill when the task involves:
Do NOT use this skill when:
Localize all strings into the following locale files: ca, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
The VSCode extension has two main areas that require localization:
| Component | Path | Purpose |
|---|---|---|
| Core Extension | src/i18n/locales/ | Extension backend strings |
| WebView UI | webview-ui/src/i18n/locales/ | User interface strings |
For detailed brand voice, tone, and word choice guidance, refer to the guidance file:
This guidance file is loaded at runtime and should be consulted for the latest brand and style standards.
src/i18n/locales/t() function is used with namespaces like 'core:errors.missingToolParameter'formatResponse.ts are intentionally not internationalized since they're internalcore.json, maintain all existing interpolation variableswebview-ui/src/i18n/locales/useTranslation hookTrans component with named components for text with embedded componentsTranslation string:
"changeSettings": "You can always change this at the bottom of the <settingsLink>settings</settingsLink>"
React component usage:
<Trans
i18nKey="welcome:telemetry.changeSettings"
components={{
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />
}}
/>
{{variable}} syntaxdefaultValue. The en translations are the fallbackapply_diff instead of write_to_file when editing existing translation files (much faster and more reliable)apply_diff, carefully identify the exact JSON structure to edit to avoid syntax errors{{variable}}) must remain exactly identical to the English source to maintain code integration and prevent syntax errorsFirst add or modify English strings, then ask for confirmation before translating to all other languages
Use this process for each localization task:
search_files tool to find JSON keys that are near new keys in English translations but do not yet exist in the other language files for apply_diff SEARCH contextsearch_files result using apply_diff without reading every fileFlag or comment if an English source string is incomplete ("please see this...") to avoid truncated or unclear translations
For UI elements, distinguish between:
Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction
Always validate your translation work by running the missing translations script:
node scripts/find-missing-translations.js
Address any missing translations identified by the script to ensure complete coverage across all locales.
{{variable}} - these must remain identical