Skip to content

feat(i18n): introduce language selection - #1

Merged
JiLiZART merged 18 commits into
mainfrom
feat/i18n
Sep 11, 2026
Merged

JiLiZART merged 18 commits into
mainfrom
feat/i18n

Conversation

@JiLiZART

@JiLiZART JiLiZART commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

JiLiZART and others added 13 commits September 7, 2026 01:19
Adds the locale port to SettingsBackend, hosts I18nProvider in TwoFAUApp,
re-exports the i18n API from @twofau/ui, and wraps user-facing strings in
unlock/setup/menu-bar/account-row/color-picker/hotkey-recorder/search views with
t()/plural(). Adds extract-i18n + check-i18n scripts. Remaining in this task:
add-view, edit-view, import-view, settings-view + language selector, host
bootstrap wiring, and running extraction.
Wraps the remaining shared components (add/edit/import/settings views) and the
extension options page in t()/plural(), adds a Language selector screen backed by
a new SettingsBackend.locale port, and wires host bootstrap: the desktop app and
both extension entry points resolve the locale and load its ui catalog before
render. Runs the extractor to populate en/ui.json (143 strings) and stubs the 11
non-English catalogs. Fixes the plural extractor regex to handle {vars} in forms.
Adds a gen-locales generator that renders the shared `store` catalog into
_locales/<locale>/messages.json (English fallback for missing keys), placeholders
name/description/autofill in the manifest with __MSG__ + default_locale, wires the
generator into build/dev (Chrome and Firefox) and vite's static copy, and gitignores
the generated _locales.
Enables Astro i18n routing (12 locales, en unprefixed), adds a server getT helper
+ a case-preserving localeUrl (Astro lowercases zh-CN/pt-BR), and wraps every page
and component (nav, footer, hero, home/desktop/extension/security sections) in t().
Localizes the Layout head with per-locale title/description, canonical, hreflang
alternates + x-default and og:locale; adds a nav LanguageSelector and passes resolved
label dicts into the HeroCta and NavInstallButton islands. Generates [locale] routes
for the four pages and extracts 309 site strings into en/site.json.
Translates the store namespace (name, description, autofill command) for all 11
non-English locales (flagged _meta.review=machine), wires `pnpm i18n:check` into the
CI wasm job, and documents the i18n workflow (add a string, extract, check, add a
locale) in DEVELOPMENT.md. UI and site catalogs are extracted and structurally in
sync; their per-locale values remain to be machine-translated and reviewed.
Fills all 143 ui keys for German, Spanish and Simplified Chinese (flagged
_meta.review=machine), with CLDR plural objects (de one/other, zh-CN other-only)
for the four plural keys and every {var} token preserved. Proof-of-quality pass;
the remaining 8 locales' ui + all site values are still stubs.
Untranslated keys are extracted as "" stubs. t() treated an empty string as a
valid translation and rendered blank, so a half-filled locale (e.g. Russian) showed
empty UI instead of English. Treat empty (and empty _ctx) values as missing and fall
back to the source key. plural() already falls back (its empty stub isn't an object).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXhirwhLQu9aou4Vxar4eL
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
2fau 27fa887 Commit Preview URL

Branch Preview URL
Sep 10 2026, 09:11 AM

JiLiZART and others added 4 commits September 9, 2026 12:56
Fills all 143 ui and 309 site keys for ru (flagged _meta.review=machine), with
Russian CLDR plural objects (one/few/many/other) for the four ui plural keys and
brand/technical terms (2FAu, Chrome/Edge/Firefox, AES-256-GCM, Rust, PBKDF2, MV3,
vault.dat, otpauth) kept literal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXhirwhLQu9aou4Vxar4eL
The menu-bar window hides on any focus loss. Opening the export/import file
dialog steals focus, so the window hid and took the dialog with it — the save
dialog flashed for a moment, the export never completed, and the button stayed
in its busy state. Track an open dialog with a shared flag (set via an RAII guard
around the blocking dialog calls in export_vault/import_vault) and skip the
focus-loss hide while it is set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXhirwhLQu9aou4Vxar4eL
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Changeset detected

.changeset/introduce_language_support.md

---
default: minor
---

# Introduce language support
Now you can select lanugage in Settings

@JiLiZART
JiLiZART merged commit d3a3822 into main Sep 11, 2026
6 checks passed
@JiLiZART
JiLiZART deleted the feat/i18n branch September 11, 2026 00:56
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.

1 participant