feat(vscode): add Persian (Farsi) UI language - #12424
Conversation
Add Farsi (fa) as a first-class UI locale for the VS Code extension, with automatic right-to-left layout (the extension already supports RTL via Arabic). - Register fa in language-utils (Locale union, LOCALES, RTL_LOCALES), language.tsx (label + merged dict layers), kiloclaw, the extension-host and cli-backend translation bundles, and both package.json language enums. - Add complete fa.ts dictionaries for all kilo-vscode i18n namespaces (sidebar, agent manager, kiloclaw, extension host, autocomplete, cli-backend). - Extend i18n tests to enforce fa key completeness and placeholder alignment. Persian language contributed by Babak Safabahar.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Notes
Files Reviewed (1 file in incremental diff)
Previous Review Summaries (6 snapshots, latest commit 99cfef2)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 99cfef2)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Notes
Files Reviewed (2 files in incremental diff)
Fix these issues in Kilo Cloud Previous review (commit 89213d1)Status: No Issues Found | Recommendation: Merge Notes
Files Reviewed (3 files in incremental diff)
Previous review (commit a7bc978)Status: No Issues Found | Recommendation: Merge Notes
Files Reviewed (1 file in incremental diff)
Previous review (commit 37888ed)Status: No Issues Found | Recommendation: Merge All 12 previously flagged untranslated strings in Files Reviewed (5 files in incremental diff)
Previous review (commit c8967e4)Status: No Issues Found | Recommendation: Merge All 11 previously flagged untranslated strings in Files Reviewed (1 file)
Previous review (commit b3242cf)Status: 11 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Aside from these gaps, all locale wiring (package.json enums, Files Reviewed (16 files)
Reviewed by claude-sonnet-5 · Input: 26 · Output: 4.2K · Cached: 608.5K Review guidance: REVIEW.md from base branch |
|
Thanks for the automated review! I've addressed all of it. Update in commit
The i18n key-completeness and placeholder-alignment tests still pass ( There is a large, active Persian-speaking developer community worldwide (Iran, Afghanistan, Tajikistan, and the diaspora) who have been waiting for first-class Farsi support in Kilo Code. Since the extension already ships RTL rendering via Arabic, this just lights up a locale many people are actively asking for. Would love a review whenever you get a chance — happy to adjust naming, ordering, or scope to match your localization conventions. Thank you! 🙏 |
The interactive question dock pinned option labels/descriptions to the left via a hardcoded text-align: left, so they rendered left-aligned even under an RTL locale (Persian/Arabic). Use logical text-align: start and logical padding on the header, and add dir=auto to question text, option label/description, collapsed preview, review rows and the suggestion text so mixed-script content renders with correct bidi. Contributed by Babak Safabahar.
|
Update: added a commit that makes the interactive question dock and the suggestion bar RTL-aware. Previously the option labels/descriptions were pinned left via a hardcoded The branch is rebased on the latest |
|
Thanks for the contribution! One blocker: |
Resync fa.ts after rebasing on main:
- Translate the 27 newly added English keys into Persian.
- Remove the 23 obsolete memory.* keys that no longer exist in en.ts.
- Translate error.chain.configDirectoryTypo and other single-quoted values
that were previously left in English.
All {{placeholder}} tokens are preserved; brand/technical terms (MCP, VS Code,
Vercel, Kilo Code, TerminalBench) intentionally stay untranslated. The i18n
key-completeness and placeholder-alignment tests pass.
Contributed by Babak Safabahar.
|
Thanks for the detailed review, @johnnyeric! I've addressed everything in the latest commit ( i18n sync (blocker)
RTL screenshots (QuestionDock / SuggestBar) Below: Persian ( The branch is rebased on the latest (Persian localization contributed by Babak Safabahar.) |
|
Thanks for addressing them, one last change needed: main has new keys that need to be updated here. |
Translate the 45 newly added keys after rebasing on upstream main, including
the four session.prompts.* keys requested by the reviewer:
- session.prompts.navLabel -> ناوبر پرامپت
- session.prompts.tick -> پرامپت {{index}} از {{total}}: {{prompt}}
- session.prompts.noAnswer -> هنوز پاسخی وجود ندارد
- session.prompts.queued -> در صف انتظار
All {{placeholder}} tokens preserved; brand terms stay untranslated.
i18n tests pass (32/32). Contributed by Babak Safabahar.
|
Done! Addressed in the latest two commits:
All The branch is |
|
Please revise the Persian translations for the following keys, as they appear too literal and are not contextually accurate: |
Revise the 8 keys flagged by the reviewer as too literal: - migration.whatsNew.features.agentManager.title: was 'مدیر عامل'; now 'Agent Manager' (product name, not translated) - agentManager.dialog.createWorktree: was 'ایجاد درختکاری'; now 'ایجاد Worktree' (git technical term) - agentManager.dialog.versionHint: 'worktree' kept in English - sidebar.session.configureWorktree.tooltip: 'worktree'/'Agent Manager' kept in English - sidebar.session.showChanges.tooltip.empty: 'working tree' kept in English - diffViewer.source.unstaged.tooltip: 'working tree'/'stage' kept in English - settings.language.description: phrasing improved - prompt.placeholder.default: already natural; minor polish Also sync fa.ts with any additional new keys added since the last commit. i18n tests pass (32/32). Contributed by Babak Safabahar.
|
Thanks for the feedback, @johnnyeric! Revised in commit All 8 keys updated:
The key fix is treating Agent Manager, Worktree/worktree, and working tree as untranslated technical terms — consistent with how Ready for re-review whenever you have a moment. Thank you! 🙏 |
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
|
All review threads are now resolved:
The branch is up to date with |
|
Thanks for the contribution and addressing the review comments! merged. |
* feat(vscode): add Persian (Farsi) UI language
Add Farsi (fa) as a first-class UI locale for the VS Code extension, with
automatic right-to-left layout (the extension already supports RTL via Arabic).
- Register fa in language-utils (Locale union, LOCALES, RTL_LOCALES),
language.tsx (label + merged dict layers), kiloclaw, the extension-host and
cli-backend translation bundles, and both package.json language enums.
- Add complete fa.ts dictionaries for all kilo-vscode i18n namespaces
(sidebar, agent manager, kiloclaw, extension host, autocomplete, cli-backend).
- Extend i18n tests to enforce fa key completeness and placeholder alignment.
Persian language contributed by Babak Safabahar.
* fix(vscode): translate remaining Persian UI strings
* fix(vscode): make question dock and suggestions RTL-aware
The interactive question dock pinned option labels/descriptions to the left
via a hardcoded text-align: left, so they rendered left-aligned even under an
RTL locale (Persian/Arabic). Use logical text-align: start and logical padding
on the header, and add dir=auto to question text, option label/description,
collapsed preview, review rows and the suggestion text so mixed-script content
renders with correct bidi.
Contributed by Babak Safabahar.
* fix(i18n): sync Persian translations with latest en.ts
Resync fa.ts after rebasing on main:
- Translate the 27 newly added English keys into Persian.
- Remove the 23 obsolete memory.* keys that no longer exist in en.ts.
- Translate error.chain.configDirectoryTypo and other single-quoted values
that were previously left in English.
All {{placeholder}} tokens are preserved; brand/technical terms (MCP, VS Code,
Vercel, Kilo Code, TerminalBench) intentionally stay untranslated. The i18n
key-completeness and placeholder-alignment tests pass.
Contributed by Babak Safabahar.
* fix(i18n): sync Persian translations with latest main
Translate the 45 newly added keys after rebasing on upstream main, including
the four session.prompts.* keys requested by the reviewer:
- session.prompts.navLabel -> ناوبر پرامپت
- session.prompts.tick -> پرامپت {{index}} از {{total}}: {{prompt}}
- session.prompts.noAnswer -> هنوز پاسخی وجود ندارد
- session.prompts.queued -> در صف انتظار
All {{placeholder}} tokens preserved; brand terms stay untranslated.
i18n tests pass (32/32). Contributed by Babak Safabahar.
* fix(i18n): improve contextual accuracy of 8 Persian translations
Revise the 8 keys flagged by the reviewer as too literal:
- migration.whatsNew.features.agentManager.title: was 'مدیر عامل'; now 'Agent Manager' (product name, not translated)
- agentManager.dialog.createWorktree: was 'ایجاد درختکاری'; now 'ایجاد Worktree' (git technical term)
- agentManager.dialog.versionHint: 'worktree' kept in English
- sidebar.session.configureWorktree.tooltip: 'worktree'/'Agent Manager' kept in English
- sidebar.session.showChanges.tooltip.empty: 'working tree' kept in English
- diffViewer.source.unstaged.tooltip: 'working tree'/'stage' kept in English
- settings.language.description: phrasing improved
- prompt.placeholder.default: already natural; minor polish
Also sync fa.ts with any additional new keys added since the last commit.
i18n tests pass (32/32). Contributed by Babak Safabahar.
* Update packages/kilo-vscode/webview-ui/src/i18n/fa.ts
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
---------
Co-authored-by: Johnny Eric Amancio <johnnyeric@gmail.com>
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>

What
Adds Persian (Farsi,
fa) as a first-class UI language for the VS Code extension, including automatic right-to-left layout.Persian language contributed by Babak Safabahar.
Why
Persian has a large developer community and was not yet available in Kilo Code. The extension already ships a right-to-left locale (Arabic), so RTL rendering works automatically once
fais registered.What changed
All changes are contained to
packages/kilo-vscodeto keep the diff from upstream OpenCode minimal:fainwebview-ui/src/context/language-utils.ts(theLocaleunion,LOCALES, andRTL_LOCALES).فارسیlabel and the merged Persian dict layer inwebview-ui/src/context/language.tsx, plus the KiloClaw language context.fato the extension-host and CLI-backend translation bundles (src/services/i18n,src/services/cli-backend/i18n)."fa"/"فارسی"to both language enums inpackage.json(UI language and commit-message language).fa.tsdictionaries for every kilo-vscode i18n namespace: sidebar, agent manager, KiloClaw, extension host, autocomplete, and CLI backend.{{placeholder}}alignment.Notes / requests
typecheckclean, all i18n tests green).ui/kilo-i18nshared layers intentionally fall back to English forfato avoid touching shared OpenCode files. Happy to extend coverage there if the maintainers prefer.