Skip to content

feat(i18n): add Russian localization for dashboard UI and manifest st…#45

Closed
gogi-eng wants to merge 1 commit into
microsoft:mainfrom
gogi-eng:feature/russian-i18n
Closed

feat(i18n): add Russian localization for dashboard UI and manifest st…#45
gogi-eng wants to merge 1 commit into
microsoft:mainfrom
gogi-eng:feature/russian-i18n

Conversation

@gogi-eng
Copy link
Copy Markdown

…rings

Description

Related Issues

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (if applicable)
  • Documentation updated (if applicable)

…rings

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.locale config) into webview HTML rendering.
  • Adds VS Code package.nls*.json files and converts package.json manifest 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 thread src/webview/app.ts
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';
Comment thread package.nls.ru.json
"command.reviewRules": "AI Engineer Coach: Проверить локальные правила",
"views.container.title": "AI Engineer Coach",
"views.dashboard.name": "Обзор",
"config.locale.description": "Язык панели. auto — как в Cursor/VS Code; ru — всегда русский."
Comment thread package.nls.json
"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 thread src/webview/i18n.ts
Comment on lines +126 to +129
export function resolveLocale(vscodeLanguage: string): Locale {
const lang = (vscodeLanguage || 'en').toLowerCase();
return lang.startsWith('ru') ? 'ru' : 'en';
}
@aymenfurter
Copy link
Copy Markdown
Contributor

Thanks for bringing i18n to our attention and providing Russian translations! We've opened #58 to implement this using the official @vscode/l10n stack with full coverage — closing this in favor of that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants