Skip to content

Enable browser translation for localized routes#48

Draft
L03TJ3 with Copilot wants to merge 5 commits into
mainfrom
copilot/research-browser-translation-support
Draft

Enable browser translation for localized routes#48
L03TJ3 with Copilot wants to merge 5 commits into
mainfrom
copilot/research-browser-translation-support

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

GoodWallet’s document-wide translation opt-out prevented browser translation for unsupported languages. The change preserves built-in English/Danish localization while allowing browser translation services to translate visible UI.

  • Document language: Root HTML now defaults to lang="en" and no longer sets translate="no".
  • Locale synchronization: The active /en or /da route updates the document language client-side:
    useEffect(() => {
      document.documentElement.lang = locale
    }, [locale])
  • Existing behavior: Locale routing, typed dictionaries, and English fallback remain unchanged.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
good-wallet-v2 Ready Ready Preview Jul 23, 2026 1:10pm

Request Review

Copilot AI changed the title [WIP] Research browser translation support alongside localized UI Enable browser translation for localized routes Jul 23, 2026
Copilot AI requested a review from L03TJ3 July 23, 2026 12:47
@L03TJ3

L03TJ3 commented Jul 23, 2026

Copy link
Copy Markdown

@copilot remove skills.lock

also, is there any reason why this was chosen to be disabled? what it would prevent or fix?

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot remove skills.lock

also, is there any reason why this was chosen to be disabled? what it would prevent or fix?

Removed the generated skills-lock.json in commit c0c3a1d. The original translate="no" was likely intended to prevent automatic translation from changing wallet-critical identifiers or code-like values (addresses, token symbols, amounts, hashes, and links), and to avoid mixed built-in/browser translations. It also disabled browser translation for all visible UI text, including unsupported-language users, so the document-wide opt-out was removed. Critical values should instead use narrowly scoped translate="no" attributes where needed.

@L03TJ3

L03TJ3 commented Jul 23, 2026

Copy link
Copy Markdown

@copilot So can you go over the wallet and apply where needed the attribute to prevent critical information to be translated

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot So can you go over the wallet and apply where needed the attribute to prevent critical information to be translated

Applied narrowly scoped translate="no" guards in 0d2cbd1 across portfolio balances/token symbols, activity amounts/addresses/hashes, receive and account addresses, recipient and WalletConnect URI inputs, send/swap amounts and confirmations, and GoodDollar claim/invite values. Localized labels, disclaimers, and other user-facing copy remain eligible for browser translation. Biome and the full Vitest suite pass.

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.

Research browser translation support alongside localized UI

2 participants