Skip to content

agent: extend live Mexican Spanish localization across the app - #1372

Merged
AnthonyRonning merged 33 commits into
masterfrom
feat/agent-i18n
Nov 7, 2026
Merged

AnthonyRonning merged 33 commits into
masterfrom
feat/agent-i18n

Conversation

@w3irdrobot

@w3irdrobot w3irdrobot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds live English/Mexican Spanish localization across Settings, chat, composer/sidebar, project dialogs, sign-in, local-store/recovery flows, native menus/tray controls and desktop dialogs. English is the source of truth. Includes the current 24-app integration catalog and ACP setup page; preserves master's removal of GitHub's token-based catalog flow.

Language changes retain drafts, task selection, filters and scroll anchors. Background operations carry semantic failures until UI formatting. Raw user/model content, commands, confirmation tokens, source records and send-receipt recovery diagnostics stay unchanged.

The review fixes disable English spellchecking while Spanish is selected, translate Maple-owned provider error bodies without changing retry diagnostics, disable Fluent's invisible bidi isolation marks, and fall back to raw text when optional error/timeline metadata is malformed. Response identity, authoritative results and row identities remain strictly decoded. Also fixes store-locale reset, missing UI notices/hints, clipped Spanish menus, wrapped disconnect notices, locale-dependent paging hashes and the duplicated sign-in-page CSP definition.

Rebased onto master 663eb20b. Same-store host reconnects and password maintenance now preserve the saved language; locking or replacing the store still clears it for the next hydration. Regression tests exercise the production event/response path. Master’s accessible text wrappers retain translated labels, and the localization guard now parses text! arguments to detect inline English and missing translation keys. The duplicate sign-in-template attributes rule was removed in favor of master’s equivalent rule.

Hosted OAuth captures a bounded locale per local attempt. macOS bundles declare English/Spanish and include Spanish permission resources. Unknown/third-party diagnostics, legacy string-only events and receipts, initial remote-upload admission errors, and the Windows NSIS installer retain their raw/English fallback. Spanish spellcheck dictionaries remain future work.

Validation on Linux: pinned CARGO_INCREMENTAL=0 RUST_TEST_THREADS=1 just ci passed (exit 0): core 859 passed/5 ignored, app 1,310 passed/3 ignored, headless 373 passed/2 ignored; all Clippy feature configurations, dependency checks and all-target build passed. Root just lane repo also passed (562 tests, 2 skipped). Earlier interrupted runs and the corrected sidebar test fixture are superseded by this complete green run. Windows CI is requested with ci:windows; real Windows runtime behavior remains unverified.

Linux preview verified the same unsent draft through English → Spanish → English: English spellcheck underlines disappear in Spanish and return in English, with no restart or draft loss. Spanish project actions fit in full and the edit menu shows no English spelling suggestions. Screenshots are attached in a PR comment. The isolated offline fixture does not verify account/billing/provider success. It lacks an AT-SPI service, so it does not establish accessibility-runtime evidence.

Nonblocking follow-ups: consolidate presented dispatch in the operations macro, replace render-time locale polling with global observers, and improve catalog maintenance/stale-translation checks. A terminology glossary is documented. Real Windows language switching, native menus/prompts and DirectWrite rendering still require a Windows smoke test; CI is separate evidence. The macOS review also reported that AppKit-owned labels follow the OS language and Full Screen can disappear when Maple is Spanish on an English OS.

@w3irdrobot w3irdrobot added the ci:package Build unsigned packages on this PR label Oct 29, 2026
@w3irdrobot
w3irdrobot marked this pull request as ready for review November 2, 2026 21:47
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Localization preview gate, captured from the rebuilt Linux desktop on this PR.

Default: gate unset — no Language selector

Settings with localization disabled; Language selector hidden

Opt-in: MAPLE_ENABLE_LOCALIZATION=1 — Language selector visible

Settings with localization enabled; Language selector visible with saved English preference

The gate applies to unpackaged, Dev, and Prod builds. Quit and reopen after changing it. Disabling the gate preserves the saved language preference; these screenshots show it returning when re-enabled. English is the only shipped catalog.

These are offline Settings checks using the disposable MDE profile; they do not claim hosted Dev/Prod integration. The previously reported GPUI quit panic remains. Images are pinned to an evidence-only commit, outside the application diff.

@w3irdrobot

Copy link
Copy Markdown
Contributor Author
Screencast_20261102_172412.webm

@AnthonyRonning

Copy link
Copy Markdown
Contributor

could be worth seeing spanish or a 2nd language here to see it flip and work?

@w3irdrobot

w3irdrobot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Spanish preview of the existing Fluent surfaces, captured from the rebuilt Linux desktop with MAPLE_ENABLE_LOCALIZATION=1.

English

English language setting

Español — after selecting it and restarting Maple

Spanish language setting after restart

Spanish language picker

Spanish language picker with Sistema, English, and Español

The saved Español preference survives desktop restart, and the language control's accessibility label changes to Idioma. The untranslated app remains English. These are offline Settings checks using a copy of a disposable Local profile; no backend services or inference requests were started. The live updater dialog and native macOS/Windows behavior are not established by these screenshots. Images are pinned to an evidence-only commit, outside the application diff.

Spanish preview pushed in 66df7da8. Full Linux RUST_TEST_THREADS=1 nix develop --no-update-lock-file -c just ci passed: 1,212 desktop tests, 800 core tests, 358 headless tests, all four Clippy configurations, dependency checks, and the build of all workspace targets. Root flake checks passed too. The Spanish regression caught a short-window dialog layout problem; the title and warning now scroll together, and both English and Spanish layout tests pass. The initial parallel run also hit two existing failures; both passed individually and in the final serial run.

@w3irdrobot w3irdrobot changed the title agent: add Fluent localization foundation agent: add Fluent localization foundation and Spanish preview Nov 3, 2026
@w3irdrobot

w3irdrobot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Language changes now show a restart notice beneath the selector, with Later / Restart now in the current UI language.

English UI, Español selected

English language restart notice

Spanish UI, English selected

Spanish language restart notice

Later dismisses the notice for the current Settings visit. Reopening Settings reminds again while the choice is pending; selecting the active language clears it. Restart now uses the existing quit coordinator, flushes settings, and stops the host before relaunching. Cancelling Quit cancels the restart, and an update installation cannot be interrupted by this action.

Native Linux verification exercised language selection, Later, reopening Settings, and Restart now relaunching into Spanish. Accessibility labels for both buttons were checked in English and Spanish. These captures use a copy of a disposable Local profile with backend services stopped; no inference requests or new account login were submitted. Native macOS/Windows behavior remains unverified.

Pushed in 95a92a96. Final Linux RUST_TEST_THREADS=1 nix develop --no-update-lock-file -c just ci passed: 1,213 desktop tests, 800 core tests, 358 headless tests, all four Clippy configurations, dependency checks, and the build of all workspace targets. Root flake checks and focused notice/restart tests passed too. An initial run hit the existing theme-helper test’s five-second deadline; it passed in isolation after compilation and in the final full run. Its source and deadline were unchanged. Images are pinned to an evidence-only commit outside the application diff.

@w3irdrobot

Copy link
Copy Markdown
Contributor Author
Screencast_20261103_115834.webm

@w3irdrobot

Copy link
Copy Markdown
Contributor Author

General settings now has complete Spanish coverage, including all row descriptions, theme/font/voice options, preview text, test notification and shared Settings navigation. Persisted values and control IDs are unchanged. The speech voice menu is wider to fit the translated labels.

English

English General settings — top

English General settings — middle

English General settings — bottom

Español

Español General settings — top

Español General settings — middle

Español General settings — bottom

Spanish voice choices

Spanish speech voices

Validation: Linux Agent just ci passed (1,214 desktop tests, 800 core tests, 358 headless tests, and all four Clippy configurations); root flake checks passed. Final layout was checked in the exact locally built desktop in both languages, with the localization preview enabled. Spanish dropdown tests verify translated labels still save the original theme and voice IDs. Screenshots use a disposable Local profile copy with backend services stopped; macOS/Windows runtime remains unverified. Images live on a separate evidence branch, outside the application diff.

@AnthonyRonning

Copy link
Copy Markdown
Contributor

Static review of 95a92a96 (nothing built or run locally). Overall I think the foundation is right: Fluent and fluent-templates are the standard Rust choice, and the boundary of UI text only, never protocol values, prompts or user content, is the right one. Zed has no official i18n (discussion #7461), and the community localized build there is a fork that rewrites string literals in the source. So there's no GPUI precedent, and putting this in the app's UI layer is the right place. A few direction changes and a categorized list are below, so it's clear what actually needs fixing versus what just needs writing down.

Direction

1. Drop MAPLE_ENABLE_LOCALIZATION. Localization should be on by default once it merges, and it shouldn't merge until we're happy with it. The gate adds code paths, test-only overrides and a hidden mode we'd need to maintain. Removing it also removes a real macOS bug: GPUI's macOS restart() relaunches through open, which doesn't carry over environment variables, so "Restart now" would come back in English with the Language row hidden.

2. Evaluate live switching before committing to restart-to-apply. Theme switching already works live (theme::apply_preference + cx.refresh_windows()), so there's precedent. Roughly what it would take:

  • Swap the active locale and clear the tr() cache, then cx.refresh_windows().
  • Reinstall native menus (ui::menus::install → cx.set_menus) and the tray menu.
  • Rebuild any view state that stores formatted strings instead of message keys or enums. Examples: the update confirmation title formatted at open, the cached system label, precomputed remote/sidebar sections.

The general rule that would make this sustainable: keep keys or enums in state and format at render. How much work this is depends on how many views store strings, which is exactly what the full-translation experiment below would show. If it turns out significantly harder, postponing it is fine.

3. If a restart stays, show the restart notice in the language just chosen. Someone switching to Español should read "Reinicia Maple…" rather than the old language. This should be cheap: look up the notice strings with the pending preference's resolved locale instead of the active one. The quit prompt shown during that restart should match too; today its button label is translated but its title and message aren't.

4. A stacked PR that translates the whole app before this merges. Once we're happy with the single-page design here, a follow-up PR on top of this one should convert 100% of the UI. It would show whether these patterns hold up at full scale (key naming, the inline-literal guard, IDs, live switching) before we commit to them. For scale, there are roughly 180 inline .child("…") literals in app/src today.

Findings, by category

Must fix before merge (OS-specific)

  • Test on real macOS and Windows. All runtime checks so far were on Linux. CI builds and tests both platforms, but nobody has run locale detection, the language switch, or restart/relaunch there. On macOS, check both a bundled .app and an unbundled dev build: for a bare executable, open launches it in Terminal.app.
  • The update prompt is only translated on Linux. On macOS and Windows, desktop.rs still calls native window.prompt with update::restart_title, RESTART_DETAIL and the literals ["Later", "Restart to Update"]. Pass the tr() strings there and delete the duplicate English in update.rs, which now also lives in en/app.ftl.

Should fix in this PR

  • Element IDs come from translated titles. Language is special-cased (setting_row_id(title) and the title.to_lowercase() slug in ui/settings.rs) so its IDs don't change with the language. Every row converted later would need the same workaround. Base all row IDs on SettingMenu::id() now.
  • Cmd+Q during the language-restart shutdown probably relaunches instead of quitting. This one is plausible from reading the code, not verified. LanguageRestartPending stays set, quit_app returns early because shutdown is already in progress, and finish_quit then restarts. An explicit Quit should cancel the pending restart.
  • Restart notice language (Direction item 3).

Document, or fix in the stacked PR

  • Per-thread language state. ACTIVE is thread-local, so a tr() call off the UI thread silently uses the OS language and skips the cache. If restart-to-apply stays, a process-wide value set once at startup is simpler and thread-safe. If we go live, it needs a deliberate shared design.
  • Translation keys are plain strings. The syn-based tests only see literal tr("…") keys, and the inline-label guard only covers update_confirmation.rs. i18n-embed's fl! macro, used by COSMIC, checks keys and arguments at compile time. Worth weighing during the full-translation PR.
  • macOS CFBundleLocalizations. Without it in Info.plist, items macOS supplies itself (Services, Hide, standard alert buttons) stay English. Already listed as deferred; keep it tracked.
  • proc-macro-hack dependency. This deprecated crate comes in through unic-langid-macros, only for langid!("en"). Minor.

Verified fine

  • OS locale resolution: macOS es-419 → es; Windows es-ES_tradnl → es.
  • New crates: all 14 new registry crates are past the 7-day publication window (newest: fluent-templates 0.15.1, 2026-08-05). The agent-supply-chain CI job passes.

@w3irdrobot

Copy link
Copy Markdown
Contributor Author
Screencast_20261103_142221.webm

@w3irdrobot w3irdrobot changed the title agent: add Fluent localization foundation and Spanish preview agent: add Fluent localization and live Spanish switching Nov 3, 2026
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Live switching now replaces restart-to-apply, and the environment gate is removed. Verified English → Español → English in one Linux desktop process (PID 1457138) and the same window, with MAPLE_ENABLE_LOCALIZATION absent. Settings labels, navigation, preview text and accessibility labels changed immediately, with no restart notice.

English

English

Español, immediately after selection

Español, immediately after selection

English again, same process

English again, same process

Captures use an isolated disposable Local profile with backend services stopped. Native macOS/Windows runtime is not verified. Regression coverage includes repeated selection, cache invalidation and an already-open update dialog changing its title.

Validation: Linux RUST_TEST_THREADS=1 nix develop --no-update-lock-file -c just ci passed, including 1,213 desktop tests, 800 core tests, 358 headless tests, all four Clippy configurations and all workspace targets. Root flake checks passed. Native runtime verified immediate English → Spanish → English switching with no restart and no localization environment variable.

Pushed in 89564604.

@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Live language switching in General settings: English → Español → English, in one continuous screen recording with the same app process and window. No restart and no localization environment variable. Recorded from commit 89564604 on Linux using a disposable Local profile.

live-language-switch.mp4

@w3irdrobot w3irdrobot changed the title agent: add Fluent localization and live Spanish switching agent: add live English/Spanish localization across Settings Nov 4, 2026
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Expanded Spanish coverage to every Settings page and their local forms, notices, shortcut labels/search, and remote controls. Language changes apply immediately without clearing typed form values.

Screenshots below are from the final Linux debug executable in an isolated X11 preview, using copied local test data. Matching English/Spanish views show Shortcuts, Integrations, and Privacy & Security; additional Spanish captures show Local API and the encryption password form. The longer Spanish safety text now fits inside the password card.

Preview API: loopback port 31270; billing: loopback port 9 (unavailable). No production endpoints. Account/billing success states, real remote pairing/update actions, and macOS/Windows runtime behavior were not verified. Backend errors and host-owned integration diagnostics (for example, “Signed in”) remain untranslated.

settings-shortcuts-en

settings-shortcuts-es

settings-integrations-en

settings-integrations-es

settings-privacy-en

settings-privacy-es

settings-local-api-es

settings-password-es

# Conflicts:
#	apps/maple-agent/app/locales/en/app.ftl
#	apps/maple-agent/app/locales/es/app.ftl
#	apps/maple-agent/app/src/ui/i18n/tests.rs
#	apps/maple-agent/app/src/ui/text_input.rs
…nt-i18n

# Conflicts:
#	apps/maple-agent/app/locales/en/app.ftl
#	apps/maple-agent/app/locales/es/app.ftl
#	apps/maple-agent/app/src/backend/local.rs
#	apps/maple-agent/app/src/ui/chat/mod.rs
#	apps/maple-agent/app/src/ui/chat/transcript.rs
#	apps/maple-agent/app/src/ui/i18n/tests.rs
#	apps/maple-agent/app/src/ui/store_gate.rs
#	apps/maple-agent/app/src/ui/store_gate/password_form_tests.rs
Carry typed host failures through chat, settings, login and recovery UI without
freezing notices at the previous locale. Preserve receipt diagnostics, task and
account fences, sidebar write ordering and legacy protocol responses.

Add semantic attachment staging errors, nested UI message contexts and transient
local-error presentation with locale, cancellation and recovery regressions.
# Conflicts:
#	apps/maple-agent/app/locales/en/app.ftl
#	apps/maple-agent/app/locales/es/app.ftl
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Final merged Linux desktop preview at 31e80aff: English → Spanish → English switched live without restarting. Chat/sidebar/composer placeholders and General Settings updated, along with the retained error wrapper. English/Spanish screenshots below.

The preview used an isolated copy of local test data, local offline API/billing endpoints, and the pinned Nix Mesa/Vulkan environment. The raw authentication diagnostic is intentionally shown through legacy fallback; no account/billing/provider success is claimed. macOS/Windows runtime checks remain unverified here.

English chat
Spanish chat
English General Settings
Spanish General Settings

@w3irdrobot w3irdrobot changed the title agent: add live English/Spanish localization across Settings agent: extend live Mexican Spanish localization across the app Nov 5, 2026
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Merge commit: ff6112b7. Full pinned Linux CI passed: 859 core, 1,299 app and 372 headless tests; all lint modes, dependency checks and repository contracts passed. The preview was built from the final merge working tree before committing.

Resolved the master merge and extended Mexican Spanish coverage to the new integration app catalog and replacement ACP setup page. Includes all 25 app summaries, categories/search, connection controls, token labels/placeholders/validation, and ACP setup instructions/copy labels.

The isolated Linux desktop preview verified English → Spanish → English switching without restart. The token form stayed open and its retained validation notice changed languages too. Generated configuration, saved descriptions, commands, and external app menu names remain exact. No credentials were entered or provider sign-in performed.

English app catalog
Spanish app catalog
English ACP setup
Spanish ACP setup
Spanish token validation
Same retained token validation after switching to English

@AnthonyRonning

Copy link
Copy Markdown
Contributor

@w3irdrobot, this is Claude, posting for Anthony. He asked me to review this PR and test it on a real Mac with a local Pro account.

Verdict: keep the approach, but don't merge yet. Nothing needs a redesign. Fluent, live switching and the semantic failure codes all held up in real use, and I found no data-safety regressions in the password, repair, send or erase flows. What's left is a Windows gap, four fixes and some cleanup.

I tested ff6112b7. 44ab3093 differs from it only by your two #[cfg(unix)] lines and the apt pins from master, so the results carry over. Line numbers are at 44ab3093, and paths are under apps/maple-agent/app/src unless shown otherwise.

Windows

Clippy and the Windows package lanes are green now, so the compile break is fixed. They don't run the app's tests, though. The full suite (agent-full-windows) only runs with ci:windows or ci:full, and this PR has only ever carried ci:package. Please add ci:windows.

Nobody has run the app on Windows yet, and that includes me. Merging commits us to i18n, so someone should do that first: language switching, native menus and prompts, and how text renders with DirectWrite.

Fix before merge

  1. Spell check marks most Spanish as wrong. The composer only has an en_US dictionary (ui/spell.rs), so nearly every word in a normal Spanish sentence gets a red underline, and mañana suggests Manama. There's no setting to turn it off. The simplest fix is to skip the check when the UI isn't English, then add a Spanish dictionary later.

  2. The main failure messages stay English. Error rows get translated titles, but only error-usage gets a translated body (ui/timeline_labels.rs:76). The other 15 Maple-written messages in apps/maple-agent/crates/maple-agent/src/agent/provider.rs have no translation path. I hit Network error: could not connect to Maple live in the Spanish UI, repeated on each retry. Rate-limit, attestation and wrong-clock errors are in the same position. Pi's retry and overflow checks match some of this text, so keep it as the raw diagnostic and add a label kind beside it, as error-usage does.

  3. Turn off Fluent's bidi marks. Add customise: |bundle| bundle.set_use_isolating(false) to static_loader! (ui/i18n.rs:10). RTL isn't supported, so they add nothing today, and they have real side effects, in English too:

    • native-quit produces Quit Maple with U+2068 and U+2069 around Maple, so an exact title match fails. AppleScript and custom macOS keyboard shortcuts that match by name should fail the same way.
    • They appear in accessibility labels.
    • Rename seeds its input from the formatted fallback name (ui/remote.rs:607-617), so they can be saved into a computer's name.
    • No bundled font has these glyphs. CoreText hides them, but we don't know yet what Windows does.
  4. Make failure and label decoding lenient before the first release. HostFailure.args is a BTreeMap<String, String> and AgentTimelineLabel.kind is required, so a wrong shape in display-only metadata can fail a whole remote frame or a stored timeline row. A bad value should fall back to the raw text. This is cheap now and frozen once it ships.

Fix soon

These don't have to block the merge.

  • Two dispatch paths. dispatch_inner_presented (backend.rs:848-1101, backend/local.rs:2438-2525) hand-copies operations and their authorization checks next to the operations! macro, and around 100 call sites name operations by string through call_presented. This is the biggest maintenance risk here, because an operation can drift between the two paths, including its authorization. I'd have operations! generate the presented path too.
  • Wrapped disconnect notices are hidden. render_notice recurses into UiText::Context (ui/chat/mod.rs:4146-4156), so notices like Could not deliver the answer: … no longer appear, where master showed them. That may be deliberate given the doc comment, but it's a behavior change. If the host is really gone, a Spanish banner appears after about 30 seconds, so this mostly loses detail on short blips.
  • Leftover English. The root cause is that From<&str> for UiText (ui/i18n.rs:405) lets raw English compile, and the guard test (ui/i18n/tests.rs:378) only covers a hand-kept file list and literal first arguments. Removing the conversion or widening the guard would stop new ones. Current examples:
    • the composer Integrations popover shows CUA_DESCRIPTION raw (ui/chat/composer.rs:608-614), though Settings translates it
    • the Codex and Claude Code setup hints (apps/maple-agent/crates/maple-agent/src/agent/integrations.rs:91,94)
    • Built into Maple (ui/settings.rs:2518) and Dismiss (ui/widgets.rs:399)
    • the reconnect status (ui/chat/mod.rs:878,880) and the Vim notices (ui/text_input/vim.rs)
    • the data-loss banner shows a raw failure.message() (ui/settings/advanced.rs:323), and its duplicate check compares localized text with English (:333-339), so that check can't match in Spanish
  • Language doesn't follow the store. clear_store_ui (desktop.rs:750) resets theme, fonts and shortcuts but not the locale. After an erase, the UI stayed Spanish, then opened in English on restart.
  • Locale polling during render. At least six render paths compare current_locale() (desktop.rs:2329, ui/settings.rs:1659, ui/chat/mod.rs:6885, ui/chat/sidebar.rs:4365, ui/remote.rs:1435, ui/update_confirmation.rs:68). The first also installs menus, updates the tray and syncs computers during render. One GPUI Global with cx.observe_global would replace them and move those side effects out of render.
  • Worker and cache details. tr runs inside backend.spawn at ui/remote.rs:1276, where the thread-local ACTIVE doesn't apply. computer_revision hashes the translated label (ui/chat/sidebar_computers.rs:369). The CSP hashes in hosted_oauth.rs:280-289 match today, but only the crate's copy is tested.
  • Clipped Spanish labels. Cambiar nombre… and Dejar de confiar e… in the 180 px project menu (ui/chat/sidebar.rs:4019), and Agregar al diccio… in the 160 px edit menu (ui/text_input.rs:1906).
  • Terminology. equipo means both computer and team, sometimes on the same card, and computadora appears elsewhere. A short glossary would settle this before more strings land.
  • Catalog upkeep. There are 76 dead keys, only 22 of 159 parameterized messages have translator comments, 25 use $argN names, and nothing flags stale Spanish when the English changes. None of this hurts today, but it will with a third language.

What held up

Tested live on macOS with a debug bundle and a local Pro fixture:

  • App tests 1,295 passed, core tests 852 passed, test_macos_localization.py 2 passed, 0 failed across all three. There were also 0 panics and 0 localization fallbacks across every launch.
  • Pro chat and tool runs work in both languages, and tool success and failure cards are translated.
  • Switching language keeps the draft, cursor, selection, task and transcript, including during a live run, with no lost or duplicated output.
  • All Settings pages, Spanish shortcut search, the slash menu, native menus (relabeled live), the Quit prompt with counts, and native alerts behave correctly apart from the leftovers above.
  • Spanish survives a restart, even after kill -9 of the host.
  • Sign-out, login and the Free plan gate work, and erase refuses BORRAR and needs exact ERASE.
  • Encryption works end to end: enable, lock, wrong password, unlock, remove.
  • es-MX and es-419 detection works. Spanish text is good (tú, no Spain-isms), and bundled fonts cover it.
  • Statically, 122 call sites have no argument mismatches, en/es variables and plurals are in parity, and I found no crash-class GPUI issues.

From Anthony's Nov 3 list, the gate removal, live switching, stable row IDs and CFBundleLocalizations are done and worked live. On a Spanish Mac, AppKit's own items appear translated. The update prompt's English literals are gone from the code, but I didn't run that prompt.

One macOS limit is worth knowing: with Spanish in Maple on an English Mac, Enter Full Screen disappears from the View menu and AppKit's own items stay English. It only happens when the two languages differ, so I'd accept it and note it.

Not tested

  • Anything on Windows
  • A packaged release build
  • The tray, remote pairing and hosted OAuth pages
  • macOS permission dialogs in Spanish
  • The usage-limit message, the reconnect tooltip and the update prompt, live
  • Attachments
  • Full just ci, including lint and headless tests

@w3irdrobot w3irdrobot added the ci:windows Run Windows checks on this PR label Nov 5, 2026
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

Review follow-up: live spelling and menu layout checked on Linux using the isolated offline fixture. The same unsent draft survived English → Spanish → English. English-dictionary underlines disappear in Spanish and return in English, without restarting. The Spanish project action labels fit in full.

The fixture intentionally has no initialized provider authentication; the visible startup diagnostic is an expected raw fallback, not a provider-success test. No request was submitted.

English spellchecking before switching
Same draft in Spanish, without English spellchecking
Spanish project menu with complete labels
Same draft after returning to English

@AnthonyRonning

Copy link
Copy Markdown
Contributor

@w3irdrobot, this is Claude again, posting for Anthony. I rechecked 565d0111 on macOS with a local Pro account. The Nov 5 fixes look good: the spell check, bidi and Integrations fixes all worked live. Three things are left before merge: one code fix, the rebase, and a Windows run.

Code fix: language resets after a host reconnect

If someone's saved language differs from their OS language, a host reconnect switches the whole UI to the OS language. The setting stays as saved, and it lasts until the next restart. This came in with the store-language fix.

To reproduce: I had English saved on a Spanish OS. I killed the host serve process and started a replacement with the same environment before the reconnect window ended. The UI flipped to Spanish while the store still held locale: "en".

Cause:

  • On HostReconnected, verify_current_store_state calls clear_saved_preference (desktop.rs:562).
  • store_ready is still true, so show_store_state takes refresh_password_settings (desktop.rs:469) instead of load_open_store.
  • initialize_saved_preference only runs in load_open_store (desktop.rs:909), so nothing puts the language back.

From reading the code, store maintenance from Settings (desktop.rs:727) looks like it takes the same path, for example an encryption change. I didn't run that one.

Suggested fix (untested): remove the clear at desktop.rs:562, since clear_store_ui (:758) and the store-id check (:861) should already cover a real store change. Please confirm that a changed store still reaches one of those, and add a HostReconnected test.

Rebase and conflict cleanup

The PR conflicts with master 663eb20b in 12 files, 53 conflicts in all, mostly from #1451. The biggest are store_gate.rs (15), transcript.rs (9), desktop.rs (8), store_repair.rs (7) and login.rs (6).

Most of these need more than picking a side. Master changed .child("Cancel") to .child(gpui::text!("Cancel")) because plain text children have no accessibility name (see the Accessibility section of apps/maple-agent/CLAUDE.md). This PR changed the same lines to .child(tr(...)).

  • Resolving them: keeping tr alone drops the accessibility name, and keeping text! alone brings back English. Combine them as gpui::text!(tr("...")). Use text!(id = ..., ...) where a call repeats under a parent with no id. Master has 61 text! lines, so please check for ones that merge cleanly but still hold English.
  • Extending the i18n guard: syn doesn't look inside macro bodies, so ui/i18n/tests.rs can't see into text!(...). Once keys move there, the guard misses both text!("English") and any bad key in text!(tr("...")). A visit_macro that parses text! arguments should cover both. New code is now told to use text!, so this gap would keep growing.
  • Removing a duplicate: master added apps/maple-agent/.gitattributes for the sign-in template, so crates/maple-agent/src/.gitattributes from this PR can go.

Windows

We'll still want to test on Windows before merging, on the rebased head. agent-full-windows passes, but nobody has run the app there yet, so language switching, native menus and prompts, and DirectWrite text rendering are all unverified.

Compile the private-directory staging failure and its UI mapping only where
the Unix permission check can construct it. This fixes warning-denied Windows
lint and x64/ARM64 packaging builds while retaining the Unix rejection path.
@w3irdrobot

Copy link
Copy Markdown
Contributor Author

@AnthonyRonning Addressed in 195f3986, rebased onto master 663eb20b.

  • Removed the locale clear from verify_current_store_state. Same-store reconnects and password maintenance now retain the saved language. Confirmed that locking/retiring the store and detecting a replacement store still reach the clearing paths, allowing the next store to hydrate its own preference.
  • Added a regression that sends HostReconnected through the fixture host's production event/response path, verifies a saved language different from the OS survives the settings refresh and password maintenance, then verifies locking clears it. Extended the replacement-generation test to check locale reset and subsequent hydration too.
  • Combined master's gpui::text! accessibility wrappers with our translated labels, preserving explicit IDs for repeated rows. Audited the wrappers that merged cleanly and retained master's quit-window lifecycle fix.
  • Extended the localization guard to parse text! arguments, detect inline text, and inspect translation keys inside the macro while excluding the optional element ID. Added a guard regression.
  • Removed the nested .gitattributes; master's component-level rule now owns the sign-in template's LF endings.

Full pinned Linux just ci passed: 859 core, 1,310 app, and 373 headless tests, plus all four Clippy configurations, dependency checks, and the all-target build. The reconnect, replacement-store, macro-guard, and localization tests passed. Root repository checks passed too (562 tests, 2 skipped).

The rebased CI run is running with ci:windows and ci:package; the full Windows suite is currently in progress. Interactive Windows language switching, native menus/prompts, and DirectWrite rendering remain unverified—we haven't treated CI as a substitute for that runtime check.

@AnthonyRonning AnthonyRonning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cicd

fmt-check failed on one `if` expression in the regression test added
for host reconnects. No behavior changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@AnthonyRonning AnthonyRonning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Smoke tested and approved.

@AnthonyRonning
AnthonyRonning merged commit b55b6a3 into master Nov 7, 2026
27 checks passed
@AnthonyRonning
AnthonyRonning deleted the feat/agent-i18n branch November 7, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR ci:windows Run Windows checks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants