Skip to content

feat(i18n): expand Brazilian Portuguese, English and Russian localization - #43

Open
josevictoremiliano wants to merge 18 commits into
RoutineMiku:mainfrom
josevictoremiliano:codex/i18n-pt-br-en
Open

josevictoremiliano wants to merge 18 commits into
RoutineMiku:mainfrom
josevictoremiliano:codex/i18n-pt-br-en

Conversation

@josevictoremiliano

@josevictoremiliano josevictoremiliano commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

Expand Brazilian Portuguese, English and Russian localization on top of upstream's eight-language interface (a694e53, current main). Preserve the first-launch language picker, custom Android system image support, background polling suspension and tray refresh optimizations.

  • Share upstream's active language and settings.uiLanguage across source-text lookup and the existing explicit message IDs. Keep upstream's eight languages and language override behavior. Migrate preferences saved by earlier i18n builds without losing the chosen language.
  • Keep 1,383 messages in each explicit-ID catalog (zh-CN, en, pt-BR, ru). Complete Brazilian Portuguese translations for the 347 new diagnostic, environment-check, adb/installation, emulator, updater and download messages, and improve the matching entries in upstream's Portuguese dictionary.
  • Update open windows through upstream's language-change notifications without reloading the main window. Exclude explicitly localized nodes/attributes from the source-text observer to avoid competing updates.
  • Add the English built-in manual for non-Chinese locales, including upstream's new language-selection and custom-image sections. Preserve the Chinese manual and all troubleshooting anchors.
  • Preserve issue codes and tutorial routing across languages. Carry the ABI retry state as an explicit flag across IPC instead of relying on translated error wording; recognize known localized ARM/ADB error templates when a raw error has no code.
  • Retain upstream's language packs and existing Android behavior. Installer strings remain Chinese, English and Brazilian Portuguese.

Contributions

  • @alexz006: Russian interface translation, incorporated from fork PR #1 with original commits and authorship preserved.
  • @anhtahaylove: 347 runtime/diagnostic messages and the English manual, incorporated from fork PR #2 with original commits and authorship preserved. The integration completes the new Brazilian Portuguese entries and updates the manual for current main.

Validation

  • Windows npm test passed on Node 20.20.2 and 22.23.5: 451 checks across 17 suites on each version, plus validation of 1,383 messages across four catalogs, interpolation and the explicit-ID renderer. This includes upstream's 26 source-dictionary/locale checks and migration coverage for earlier language preferences.
  • npm run i18n:check: no missing source-text English translations or dictionary validation errors.
  • npm run test:i18n:ui: all eight languages passed language switching without reloads, settings layout, context menus, localized search, microphone/GPU controls, laboratory navigation, diagnostic help routing and app-launch feedback. Both bundled/download startup splash variants passed in Portuguese, English, Russian and Chinese.
  • npm run test:ui and npm run test:ui:en: 24 checks passed in each language, including upstream's custom-image controls and eight-language selector.
  • Chinese and English manuals have matching IDs and tag structure; localized ARM/ADB launch errors retain correct tutorial routing.
  • test/pointer-hook-logic.ps1: POINTER_HOOK_LOGIC_OK.
  • Syntax checks and git diff --check passed.

Scope and limitations

The new Russian runtime entries remain the contribution's English placeholders pending translation. Other upstream languages retain their existing dictionaries and use English for explicit-ID messages without a matching translation. Upstream source-text lookup keeps its Chinese fallback. App names, package names, paths, release notes and raw runtime output are preserved; some low-level output can still be Chinese. The manual is available in Chinese and English.

Electron UI tests use isolated mock Android APIs. They do not validate real Android app startup, microphone/GPU hardware behavior or installing a custom system image. The earlier local 0.4.2-i18n.1 build was manually installed and tested; this updated integration has not been manually tested as an installed application. Optional real-APK tests were skipped because no fixture was supplied. No new installer or public release was published.

See docs/I18N.md for message-format compatibility, fallback behavior and local test build instructions.

Merge origin/main while preserving saved orientation, translating new gaming controls and orientation messages, and isolating engine tests from running emulators.

@mgramelich mgramelich left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sounds good

Resolve upstream integration conflicts while preserving standalone runtime, drivers, preflight, resource and orientation features. Translate new UI and splash strings, initialize catalogs before startup windows, render context menu labels lazily, and validate translations in the existing CI test command.
Merge current main while preserving native window fixes, ARM retry handling, settings categories, automatic diagnostics and manual routing. Add localized UI messages, keep language selection in the basic category, defer category labels until catalogs load, and validate category search and tutorial routing in isolated UI tests.
Preserve upstream incremental updates, microphone support, GPU preferences, laboratory settings and runtime fixes. Resolve integration conflicts, add corresponding locale messages and validate hardware controls in the isolated UI suite.
Add a Russian catalog (1,033 messages, same keys and placeholders as en),
register it in core/i18n.js, add the "Русский" option to Settings → Language,
pick it automatically for ru/ru-* system locales, ship the Chromium ru locale,
and cover it in test/i18n-test.js.
@alexz006

Copy link
Copy Markdown

Hi @josevictoremiliano, thanks for the i18n layer. I've opened a PR against this branch that adds a Russian (ru) translation: josevictoremiliano#1

It adds src/locales/ru.json (all 1,033 messages, same keys and placeholders as en.json), registers ru in src/core/i18n.js (also picked automatically for ru-* system locales), adds "Русский" to Settings → Language, and extends test/i18n-test.js. node test/i18n-test.js passes with 4 locales. If you merge it into your branch, Russian would land together with this PR.

Keys settings.dnsServers, settings.dnsServersCn and settings.dnsServersNote in
all four catalogs, for the DNS selector proposed upstream; the markup needs
data-i18n attributes once both changes meet.
@josevictoremiliano josevictoremiliano changed the title feat(i18n): add Brazilian Portuguese and English interface translations feat(i18n): add Brazilian Portuguese, English and Russian interface translations Nov 26, 2026
@josevictoremiliano

Copy link
Copy Markdown
Author

Thanks @alexz006 for contributing the Russian translation and for testing it! I reviewed and incorporated both of your commits from PR #1, preserving your authorship.

The full test suite passed on Node 20 and 22, with 1,036 messages validated across all four catalogs. Isolated Electron tests also passed for language switching, settings and both startup splash variants in Russian and the existing languages. I added Russian language-pack retention for portable builds and updated this PR's title and description to include Russian.

@anhtahaylove

Copy link
Copy Markdown

FYI @josevictoremiliano: #43 leaves the main-process strings (diagnostic findings, environment check, adb/installer errors, emulator/updater/download messages) and the built-in manual in Chinese for non-Chinese locales. I opened a follow-up against this branch that moves them into the catalogs and adds an English manual: josevictoremiliano#2 (347 new keys; pt-BR and ru entries are English placeholders for native speakers to translate).

@josevictoremiliano josevictoremiliano changed the title feat(i18n): add Brazilian Portuguese, English and Russian interface translations feat(i18n): expand Brazilian Portuguese, English and Russian localization Nov 26, 2026
@josevictoremiliano

Copy link
Copy Markdown
Author

Thanks @anhtahaylove for identifying the remaining untranslated messages and contributing PR #2! Your work adds 347 catalog entries for diagnostics, environment checks, adb/installation errors, emulator, updater and download messages, along with an English version of the built-in manual and localized manual topic titles.

I reviewed and incorporated your contribution into this PR, preserving all your original commits and authorship. I also completed the new Brazilian Portuguese entries, synchronized the English manual with the latest main, and resolved the conflicts with upstream's eight-language implementation. The new Russian entries remain English placeholders pending translation.

The full test suite passed on Node 20 and 22, and isolated Electron UI tests passed across all eight languages. Thank you for helping extend localization beyond the interface!

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.

4 participants