translation
npx skills add https://github.com/kilo-org/kilocode --skill translation
Agent 安装分布
Skill 文档
Translation Guidelines
This file provides guidance to agents when working with translations in this repository.
For the translation workflow, use the /add-missing-translations command or see .kilocode/workflows/add-missing-translations.md.
1. SUPPORTED LANGUAGES AND LOCATION
- Localize all strings into the following locale files: ar, ca, cs, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, th, tr, uk, vi, zh-CN, zh-TW
- The VSCode extension has two main areas that require localization:
- Core Extension: src/i18n/locales/, src/package.nls.json, src/package.nls..json (extension backend)
- WebView UI: webview-ui/src/i18n/locales/ (user interface)
2. VOICE, STYLE AND TONE
- Always use informal speech (e.g., “du” instead of “Sie” in German) for all translations
- Maintain a direct and concise style that mirrors the tone of the original text
- Carefully account for colloquialisms and idiomatic expressions in both source and target languages
- Aim for culturally relevant and meaningful translations rather than literal translations
- Preserve the personality and voice of the original content
- Use natural-sounding language that feels native to speakers of the target language
- Don’t translate the word “token” as it means something specific in English that all languages will understand
- Don’t translate domain-specific words (especially technical terms like “Prompt”) that are commonly used in English in the target language
3. CORE EXTENSION LOCALIZATION (src/)
- Located in src/i18n/locales/
- NOT ALL strings in core source need internationalization – only user-facing messages
- Internal error messages, debugging logs, and developer-facing messages should remain in English
- The t() function is used with namespaces like ‘core:errors.missingToolParameter’
- Be careful when modifying interpolation variables; they must remain consistent across all translations
- Some strings in formatResponse.ts are intentionally not internationalized since they’re internal
- When updating strings in core.json, maintain all existing interpolation variables
- Check string usages in the codebase before making changes to ensure you’re not breaking functionality
4. WEBVIEW UI LOCALIZATION (webview-ui/src/)
- Located in webview-ui/src/i18n/locales/
- Uses standard React i18next patterns with the useTranslation hook
- All user interface strings should be internationalized
- Always use the Trans component with named components for text with embedded components
example:
"changeSettings": "You can always change this at the bottom of the <settingsLink>settings</settingsLink>",
<Trans
i18nKey="welcome:telemetry.changeSettings"
components={{
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />
}}
/>
5. TECHNICAL IMPLEMENTATION
- Use namespaces to organize translations logically
- Handle pluralization using i18next’s built-in capabilities
- Implement proper interpolation for variables using {{variable}} syntax
- Don’t include defaultValue. The
entranslations are the fallback - Always use apply_diff instead of write_to_file when editing existing translation files (much faster and more reliable)
- When using apply_diff, carefully identify the exact JSON structure to edit to avoid syntax errors
- Placeholders (like {{variable}}) must remain exactly identical to the English source to maintain code integration and prevent syntax errors
6. WORKFLOW AND APPROACH
- First add or modify English strings, then ask for confirmation before translating to all other languages
- Use this process for each localization task:
- Identify where the string appears in the UI/codebase
- Understand the context and purpose of the string
- Update English translation first
- Use the
<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 context - Create appropriate translations for all other supported languages utilizing the
search_filesresult using<apply_diff>without reading every file. - Do not output the translated text into the chat, just modify the files.
- Validate your changes with the missing translations script
- Flag or comment if an English source string is incomplete (“please see this…”) to avoid truncated or unclear translations
- For UI elements, distinguish between:
- Button labels: Use short imperative commands (“Save”, “Cancel”)
- Tooltip text: Can be slightly more descriptive
- Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction, avoiding language that makes it sound like an instruction from the system to the user
7. COMMON PITFALLS TO AVOID
- Switching between formal and informal addressing styles – always stay informal (“du” not “Sie”)
- Translating or altering technical terms and brand names that should remain in English
- Modifying or removing placeholders like {{variable}} – these must remain identical
- Translating domain-specific terms that are commonly used in English in the target language
- Changing the meaning or nuance of instructions or error messages
- Forgetting to maintain consistent terminology throughout the translation
8. QUALITY ASSURANCE
- Maintain consistent terminology across all translations
- Respect the JSON structure of translation files
- Watch for placeholders and preserve them in translations
- Be mindful of text length in UI elements when translating to languages that might require more characters
- Use context-aware translations when the same string has different meanings
- 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
9. TRANSLATOR’S CHECKLIST
- â Used informal tone consistently (“du” not “Sie”)
- â Preserved all placeholders exactly as in the English source
- â Maintained consistent terminology with existing translations
- â Kept technical terms and brand names unchanged where appropriate
- â Preserved the original perspective (userâsystem vs systemâuser)
- â Adapted the text appropriately for UI context (buttons vs tooltips)
Language-Specific Guidelines
German (de) Translation Guidelines
Key Rule: Always use informal speech (“du” form) in all German translations without exception.
Quick Reference
| Category | Formal (Avoid) | Informal (Use) | Example |
|---|---|---|---|
| Pronouns | Sie | du | you |
| Possessives | Ihr/Ihre/Ihrem | dein/deine/deinem | your |
| Verbs | können Sie, müssen Sie | kannst du, musst du | you can, you must |
| Imperatives | Geben Sie ein, Wählen Sie | Gib ein, Wähle | Enter, Choose |
Technical terms like “API”, “token”, “prompt” should not be translated.
Simplified Chinese (zh-CN) Translation Guidelines
Key Terminology
| English Term | Preferred (zh-CN) | Avoid | Context/Notes |
|---|---|---|---|
| API Cost | API è´¹ç¨ | API ææ¬ | è´¢å¡ç¸å ³æ¯è¯ |
| Tokens | Token | Tokens/令ç | ä¿çæ½è±¡æ¯è¯ |
| Token Usage | Token 使ç¨é | Token ç¨é | ææ¯è®¡éåä½ |
| Cache | ç¼å | é«éç¼å | ç®æ´ä¼å |
| Context | ä¸ä¸æ | ä¿çæ½è±¡æ¯è¯ | |
| Context Menu | å³é®èå | ä¸ä¸æèå | ææ¯æ¯è¯åç¡® |
| Context Window | ä¸ä¸æçªå£ | ææ¯æ¯è¯åç¡® | |
| Proceed While Running | 强å¶ç»§ç» | è¿è¡æ¶ç»§ç» | æä½å½ä»¤ |
| Enhance Prompt | å¢å¼ºæç¤ºè¯ | ä¼åæç¤º | AIç¸å ³åè½ |
| Auto-approve | èªå¨æ¹å | å§ç»æ¹å | æéç¸å ³æ¯è¯ |
| Checkpoint | åæ¡£ç¹ | æ£æ¥ç¹/å¿«ç § | ææ¯æ¦å¿µç»ä¸ |
| MCP Server | MCP æå¡ | MCP æå¡å¨ | ææ¯ç»ä»¶ |
| Human Relay | äººå·¥è¾ å©æ¨¡å¼ | 人工ä¸ç»§ | åè½æè¿°æ¸ æ° |
| Network Timeout | 请æ±è¶ æ¶ | ç½ç»è¶ æ¶ | æ´åç¡®æè¿° |
| Terminal | ç»ç«¯ | å½ä»¤è¡ | ææ¯æ¯è¯ç»ä¸ |
| diff | 差弿´æ° | å·®å/è¡¥ä¸ | 代ç åæ´ |
| prompt caching | æç¤ºè¯ç¼å | æç¤ºç¼å | AIåè½ |
| computer use | è®¡ç®æºäº¤äº | è®¡ç®æºä½¿ç¨ | ææ¯è½å |
| rate limit | API 请æ±é¢çéå¶ | éçéå¶ | APIæ§å¶ |
| Browser Session | æµè§å¨ä¼è¯ | æµè§å¨è¿ç¨ | ææ¯æ¦å¿µ |
| Run Command | è¿è¡å½ä»¤ | æ§è¡å½ä»¤ | æä½å¨è¯ |
| power steering mode | å¢å¼ºå¯¼åæ¨¡å¼ | å¨åè½¬åæ¨¡å¼ | é¿å ç´è¯ |
| Boomerang Tasks | 任塿å | åæéä»»å¡ | é¿å ç´è¯ |
Formatting Rules
-
ä¸è±ææ··æ
- æ·»å ç©ºæ ¼ï¼å¨ä¸æåè±æ/æ°åä¹é´æ·»å ç©ºæ ¼ï¼å¦”API 费稔ï¼ä¸æ¯”API费稔ï¼
- å使 ¼å¼ï¼æ¶é´åä½ç»ä¸ä¸º”15ç§”ã”1åé”ï¼ä¸æ¯”15 seconds”ã”1 minute”ï¼
- æ°åèå´ï¼”已使ç¨: {{used}} / {{total}}”
- ææ¯ç¬¦å·ä¿çåæ ·ï¼”{{amount}} tokens”â”{{amount}}”
-
æ ç¹ç¬¦å·
- 使ç¨ä¸æå ¨è§æ ç¹
- å表项使ç¨ä¸æé¡¿å·ï¼”å建ãç¼è¾æä»¶”
-
UIææ¬ä¼å
- æé®ææ¬ï¼ä½¿ç¨ç®æ´å¨è¯ï¼å¦”å±å¼”ä¼äº”æ¥çæ´å¤”
- æä½è¯´æï¼ä½¿ç¨æ¥éª¤å¼è¯´æï¼1. 2. 3.ï¼æ¿ä»£é¿æ®µè½
- é误æç¤ºï¼ä½¿ç¨”确认å é¤ï¼æ¤æä½ä¸å¯é”æ¿ä»£”Are you sure…?”
- æä½è¯´æè¦ç®æ´ï¼”Shift+ææ½æä»¶”ä¼äºé¿æè¿°
- æé®ææ¬æ§å¶å¨2-4个æ±åï¼”å±å¼”ä¼äº”æ¥çæ´å¤”
-
ææ¯æè¿°
- ä¿çè±æç¼©åï¼å¦”MCP”ä¸ç¿»è¯
- ç»ä¸æ¯è¯ï¼æ´ä¸ªç³»ç»ä¸ç¸åæ¦å¿µä½¿ç¨ç¸åè¯æ³
- é¿å¥æå为çå¥
- 被å¨è¯æè½¬ä¸ºä¸»å¨è¯æ
- åè½åç§°ç»ä¸ï¼”è®¡ç®æºäº¤äº”ä¼äº”è®¡ç®æºä½¿ç¨”
- åæ°è¯´æï¼”差弿´æ°”ä¼äº”å·®å/补且
-
åéå ä½ç¬¦
- ä¿æåæ ¼å¼ï¼
{{variable}} - ä¸æè¯´ææ¾å¨åéå¤ï¼”Token 使ç¨é: {{used}}”
- ä¿æåæ ¼å¼ï¼
UI Element Translation Standards
-
æé®(Buttons)
- 确认类ï¼ç¡®å®/åæ¶/åºç¨/ä¿å
- æä½ç±»ï¼æ·»å /å é¤/ç¼è¾/导åº
- ç¶æç±»ï¼å¯ç¨/ç¦ç¨/å±å¼/æ¶èµ·
- é¿åº¦éå¶ï¼2-4个æ±å
-
èå(Menus)
- 主èåï¼æä»¶/ç¼è¾/è§å¾/帮å©
- åèåï¼ä½¿ç¨”>”è¿æ¥ï¼å¦”æä»¶>æå¼”
- å¿«æ·é®ï¼ä¿çè±æï¼å¦”Ctrl+S”
-
æ ç¾(Labels)
- è®¾ç½®é¡¹ï¼æè¿°åè½ï¼å¦”èªå¨ä¿åé´é”
- ç¶ææç¤ºï¼ç®æ´æç¡®ï¼å¦”æ£å¨å¤ç…”
- åä½è¯´æï¼æ¾å¨æ¬å·å ï¼å¦”è¶ æ¶æ¶é´(ç§)”
-
å·¥å ·æç¤º(Tooltips)
- åè½è¯´æï¼ç®æ´æè¿°ï¼å¦”å¤å¶éä¸å 容”
- æä½æå¼ï¼æ¥éª¤æç¡®ï¼å¦”åå»ç¼è¾åå æ ¼”
- é¿åº¦éå¶ï¼ä¸è¶ è¿50个æ±å
-
å¯¹è¯æ¡(Dialogs)
- æ é¢ï¼è¯´æå¯¹è¯æ¡ç¨é
- æ£æï¼å段è½è¯´æ
- æé®ï¼ä½¿ç¨å¨è¯ï¼å¦”确认å 餔
Contextual Translation Principles
-
æ ¹æ®UIä½ç½®è°æ´
- æé®ææ¬ï¼ç®æ´å¨è¯ (妔å±å¼”, “æ¶èµ·”)
- è®¾ç½®é¡¹ï¼æè¿°æ§ (妔èªå¨æ¹ååå ¥æä½”)
- 叮婿æ¬ï¼å®æ´è¯´æ (妔å¼å¯åèªå¨å建任å¡åæ¡£ç¹ï¼æ¹ä¾¿å溯修湔)
-
ææ¯ææ¡£é£æ ¼
- 使ç¨ä¸»å¨è¯æï¼å¦”èªå¨å建åç¼è¾æä»¶”
- é¿å å£è¯å表达
- 夿åè½ä½¿ç¨åç¹è¯´æ
- 说ææä½ç»æï¼å¦”æ éäºæ¬¡ç¡®è®¤”
- åæ°è¯´ææ¸ æ°ï¼å¦”å»¶è¿ä¸æ®µæ¶é´åèªå¨æ¹ååå ¥”
-
åç/产ååç§°
- ä¿çè±æåçå
- ææ¯æ¯è¯ä¿æä¸è´æ§
- ä¿çè±æä¸æåè¯ï¼å¦”Amazon Bedrock ARN”
-
ç¨æ·æä½
- æä½å¨è¯ç»ä¸ï¼
- “Click”â”ç¹å»”
- “Type”â”è¾å ¥”
- “Scroll”â”æ»å¨”
- æé®ç¶æï¼
- “Enabled”â”å·²å¯ç¨”
- “Disabled”â”å·²ç¦ç¨”
- æä½å¨è¯ç»ä¸ï¼
Technical Documentation Guidelines
-
ææ¯æ¯è¯
- ç»ä¸ä½¿ç¨”Token”èé”令ç”
- ä¿çè±æä¸æåè¯ï¼å¦”Model Context Protocol”
- åè½åç§°ç»ä¸ï¼å¦”è®¡ç®æºåè½è°ç¨”ä¼äº”è®¡ç®æºä½¿ç¨”
-
APIææ¡£
- 端ç¹(Endpoint)ï¼ä¿çåå§è·¯å¾
- åæ°è¯´æï¼è¡¨æ ¼å½¢å¼å±ç¤º
- 示ä¾ï¼ä¿çä»£ç æ ¼å¼
- åæ°æ ç¾ï¼
- åä½æç¡®ï¼å¦”æå¤§è¾åº Token æ°”
- èå´è¯´æå®æ´ï¼å¦”模åå¯ä»¥å¤ççæ» Token æ°”
-
代ç ç¸å ³ç¿»è¯
- ä»£ç æ³¨éï¼
- ä¿çææ¯æ¯è¯ï¼å¦”// Initialize MCP client”
- ç®ç说æï¼å¦”æ£æ¥æä»¶æ¯å¦å娔
- é误信æ¯ï¼
- å å«é误代ç ï¼å¦”Error 404: æä»¶æªæ¾å°”
- æä¾è§£å³æ¹æ¡ï¼å¦”è¯·æ£æ¥æä»¶æé”
- å½ä»¤è¡ï¼
- ä¿çåçå½ä»¤ï¼å¦”git commit -m ‘message'”
- åæ°è¯´æï¼å¦”-v: æ¾ç¤ºè¯¦ç»è¾åº”
- ä»£ç æ³¨éï¼
-
é ç½®æå
- 设置项å½åï¼å¦”Enable prompt caching”â”å¯ç¨æç¤ºè¯ç¼å”
- ä»·æ ¼æè¿°ï¼
- åä½ç»ä¸ï¼å¦”æ¯ç¾ä¸ Token çææ¬”
- 说æå½±åï¼å¦”è¿ä¼å½±åçæå 容åè¡¥å ¨çææ¬”
- æä½è¯´æï¼
- 使ç¨ç¼å·æ¥éª¤ï¼å¦”1. 注åGoogle Cloud账巔
- æ¥éª¤å¨è¯ä¸è´ï¼å¦”å®è£ é ç½®Google Cloud CLIå·¥å ·”
Common Patterns
| Original | Avoid | Preferred |
|---|---|---|
"dragFiles" |
"æä½shiftæå¨æä»¶" |
"Shift+ææ½æä»¶" |
"description" |
"å¯ç¨åï¼Kilo Code å°è½å¤ä¸ MCP æå¡å¨äº¤äºä»¥è·åé«çº§åè½ã" |
"å¯ç¨å Kilo Code å¯ä¸ MCP æå¡äº¤äºè·åé«çº§åè½ã" |
"cannotUndo" |
"æ¤æä½æ æ³æ¤æ¶ã" |
"æ¤æä½ä¸å¯éã" |
"hold shift to drag in files" |
"æä½shiftæå¨æä»¶" |
"Shift+ææ½æä»¶" |
"Double click to edit" |
"åå»è¿è¡ç¼è¾" |
"åå»ç¼è¾" |
Common Pitfalls
-
é¿å è¿åº¦ç´è¯å¯¼è´ç硬
- â “Do more with Boomerang Tasks” ⠓使ç¨åæéä»»å¡å®ææ´å¤å·¥ä½”
- â “Do more with Boomerang Tasks” â “å è®¸ä»»å¡æå”
-
ä¿æåè½æè¿°åç¡®
- â “Enhance prompt with additional context” ⠓使ç¨éå ä¸ä¸æå¢å¼ºæç¤º”
- â “Enhance prompt with additional context” â “å¢å¼ºæç¤ºè¯”
-
æä½æå¼æ¸ æ°
- â “hold shift to drag in files” â “æä½shiftæå¨æä»¶”
- â “hold shift to drag in files” â “Shift+ææ½æä»¶”
-
ç¡®ä¿æ¯è¯ä¸è´æ§
- â åä¸ææ¡£ä¸æ··ç¨”Token”/”令ç”/”代帔
- â ç»ä¸ä½¿ç¨”Token”ä½ä¸ºææ¯æ¯è¯
-
注ææåéåºæ§
- â “Kill the process” â “ææ»è¿ç¨”(è¿äºæ´å)
- â “Kill the process” â “ç»æ¢è¿ç¨”
-
ææ¯ææ¡£ç¹æ®å¤ç
- 代ç 示ä¾ä¸ç注éï¼ â ç¿»è¯åç ´å代ç ç»æ â ä¿æä»£ç æ³¨éåæ ·æä» ç¿»è¯è¯´æé¨å
- å½ä»¤è¡åæ°ï¼ â ç¿»è¯åæ°åç§°å¯¼è´æ æ³ä½¿ç¨ â ä¿æåæ°åç§°è±æï¼ä» ç¿»è¯è¯´æ
Best Practices
-
ç¿»è¯å·¥ä½æµç¨
- éè¯»å ¨æçè§£ä¸ä¸æ
- æ è®°å¹¶ç»ä¸ææ¯æ¯è¯
- åæ®µç¿»è¯å¹¶æ£æ¥ä¸è´æ§
- æç»æ´ä½å®¡æ ¡
-
è´¨éæ£æ¥è¦ç¹
- æ¯è¯ä¸è´æ§
- åè½æè¿°åç¡®æ§
- UIå ç´ é¿åº¦éé æ§
- æåéåºæ§
-
å·¥å ·ä½¿ç¨å»ºè®®
- 建ç«é¡¹ç®æ¯è¯åº
- 使ç¨ç¿»è¯è®°å¿å·¥å ·
- ç»´æ¤é£æ ¼æå
- å®ææ´æ°ç¿»è¯èµæº
-
å®¡æ ¡æµç¨
- åç¿» â ææ¯å®¡æ ¡ â è¯è¨æ¶¦è² â æç»ç¡®è®¤
- éç¹å ³æ³¨ææ¯åç¡®æ§ãè¯è¨æµç 度åUIæ¾ç¤ºææ
Quality Checklist
- æ¯è¯æ¯å¦å ¨æä¸è´ï¼
- æ¯å¦ç¬¦åä¸æææ¯ææ¡£ä¹ æ¯ï¼
- UIæ§ä»¶ææ¬æ¯å¦ç®æ´æç¡®ï¼
- é¿å¥æ¯å¦å·²åçæåï¼
- åéå ä½ç¬¦æ¯å¦ä¿çåæ ¼å¼ï¼
- ææ¯æè¿°æ¯å¦åç¡®æ 误ï¼
- æå表达æ¯å¦æ°å½ï¼
- æ¯å¦ä¿æäºåæç精确å«ä¹ï¼
- ç¹æ®æ ¼å¼(å¦åéã代ç )æ¯å¦æ£ç¡®ä¿çï¼
Traditional Chinese (zh-TW) Translation Guidelines
Key Terminology
| English Term | Use (zh-TW) | Avoid (Mainland) |
|---|---|---|
| file | æªæ¡ | æä»¶ |
| task | å·¥ä½ | ä»»å |
| project | å°æ¡ | é ç® |
| configuration | è¨å® | é ç½® |
| server | 伺æå¨ | æåå¨ |
| import/export | å¯å ¥/å¯åº | å°å ¥/å°åº |
Formatting Rules
- Add spaces between Chinese and English/numbers: “AI é© å” (not “AIé© å”)
- Use Traditional Chinese quotation marks: ãç¯ä¾æåã(not “ç¯ä¾æå”)
- Use Taiwanese computing conventions rather than mainland terminology