feat(i18n): add Russian localization for dashboard UI and manifest st…#45
Closed
gogi-eng wants to merge 1 commit into
Closed
feat(i18n): add Russian localization for dashboard UI and manifest st…#45gogi-eng wants to merge 1 commit into
gogi-eng wants to merge 1 commit into
Conversation
…rings Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Russian localization support for the extension’s dashboard UI (webviews) and localizes VS Code manifest strings, with an opt-in locale override setting.
Changes:
- Introduces a small in-webview i18n system (
t,tFormat, locale resolution) with RU/EN message dictionaries. - Localizes dashboard shell/sidebar UI strings and wires VS Code/UI language (and new
aiEngineerCoach.localeconfig) into webview HTML rendering. - Adds VS Code
package.nls*.jsonfiles and convertspackage.jsonmanifest strings to NLS placeholders.
Show a summary per file
| File | Description |
|---|---|
| src/webview/styles.css | Adds layout wrapper + RU language banner styling; adjusts content sizing for flex layout. |
| src/webview/panel.ts | Passes resolved UI language into dashboard/error HTML generation. |
| src/webview/panel-sidebar.ts | Localizes sidebar webview strings and sets <html lang>/date formatting based on resolved locale. |
| src/webview/panel-html.ts | Localizes dashboard shell HTML and error page title; adds RU “partial translation” banner. |
| src/webview/page-dashboard.ts | Replaces hard-coded dashboard strings with i18n lookups; moves fun score labels into i18n. |
| src/webview/i18n.ts | New RU/EN message catalog and translation helpers; locale resolution + score label helpers. |
| src/webview/app.ts | Initializes active locale from <html lang> at webview startup. |
| src/ui-locale.ts | New extension-host helper to derive UI language tag/locale from config or VS Code environment. |
| package.nls.json | Adds default (EN) localized manifest strings, including the new setting description. |
| package.nls.ru.json | Adds RU localized manifest strings, including the new setting description. |
| package.json | Switches manifest strings to NLS placeholders and adds aiEngineerCoach.locale setting contribution. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 11/11 changed files
- Comments generated: 4
Comment on lines
+8
to
13
| import { setLocaleFromDocument } from './i18n'; | ||
| import { AntiPatternData, DateFilter, StatsResult } from '../core/types'; | ||
|
|
||
| setLocaleFromDocument(); | ||
| import { $, $$, rpc, destroyCharts, initMessageListener, withErrorBoundary } from './shared'; | ||
| import { html, render, unmount, ComponentChildren } from './render'; |
| "command.reviewRules": "AI Engineer Coach: Проверить локальные правила", | ||
| "views.container.title": "AI Engineer Coach", | ||
| "views.dashboard.name": "Обзор", | ||
| "config.locale.description": "Язык панели. auto — как в Cursor/VS Code; ru — всегда русский." |
| "command.reviewRules": "AI Engineer Coach: Review Local Rule Approvals", | ||
| "views.container.title": "AI Engineer Coach", | ||
| "views.dashboard.name": "Dashboard", | ||
| "config.locale.description": "Dashboard language. auto = follow VS Code/Cursor display language." |
Comment on lines
+126
to
+129
| export function resolveLocale(vscodeLanguage: string): Locale { | ||
| const lang = (vscodeLanguage || 'en').toLowerCase(); | ||
| return lang.startsWith('ru') ? 'ru' : 'en'; | ||
| } |
Contributor
|
Thanks for bringing i18n to our attention and providing Russian translations! We've opened #58 to implement this using the official |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…rings
Description
Related Issues
Checklist
npm run checkpasses (typecheck + lint + spellcheck + knip + tests)