Skip to content

fix(i18n): complete pt-BR strings and localize relative dates - #1213

Open
felipemontenegro91 wants to merge 3 commits into
jamiepine:mainfrom
felipemontenegro91:contrib/pt-br-missing-strings
Open

felipemontenegro91 wants to merge 3 commits into
jamiepine:mainfrom
felipemontenegro91:contrib/pt-br-missing-strings

Conversation

@felipemontenegro91

@felipemontenegro91 felipemontenegro91 commented Oct 20, 2026 •

Copy link
Copy Markdown

Brazilian Portuguese still falls back to English in a few places. This PR fixes three of them.

1. Missing strings (17 entries). These cover:

  • the custom LLM endpoint settings;
  • the remote-refinement notices;
  • the OmniVoice attribute guidance;
  • the About page's "Built with" label.

All 847 existing strings are preserved. The 18 missing GPU/ROCm entries are intentionally excluded because #919 already proposes them. Interpolation variables, product names, the sample endpoint URL and the English OmniVoice examples required by its fixed vocabulary are kept as they are.

2. Stale GPU string. settings.gpu.switchToCpu.description still said "you can re-download CUDA later". The English source changed to "re-download the GPU backend later" when ROCm support landed, and the Portuguese now translates the current text. No open PR touches this key.

3. Relative dates. getDateLocale() in app/src/lib/utils/format.ts had no pt-BR case. Timestamps in history, captures and MCP bindings stayed in English ("5 minutes ago") while the rest of the UI was in Portuguese. The fix maps pt-BR to date-fns ptBR, following the existing es/fr/ja/zh pattern.

With the fix, the output changes like this:

Before After
5 minutes ago há 5 minutos
2 hours ago há cerca de 2 horas
visto pela última vez 5 minutes ago visto pela última vez há 5 minutos

ko and it have the same gap; I left them out to keep this PR scoped to pt-BR. No open PR maps ptBR in format.ts. #599 adds ru the same way, which may cause a trivial import-line conflict.

Validation on main (8af7efe + this branch)

  • Biome 2.3.12 check and git diff --check pass.
  • tsc --noEmit passes for app and web, and the web production build passes.
  • JSON, duplicate-key, interpolation and markup checks pass. pt-BR has 864 leaves, all present in en. The only 18 remaining gaps match the GPU strings proposed in fix(i18n): add Cloud login translations for es, it, ko #919.
  • i18next 26.0.6 resolves the new and updated entries to pt-BR without fallback.
  • I checked date-fns 3.6.0 with ptBR directly, which is where the table above comes from.
  • I did not run the desktop app built from main.

CHANGELOG.md is intentionally unchanged, because its header marks it as generated and says not to edit it manually. Suggested release note: "Translate custom LLM settings, remote-refinement notices, OmniVoice guidance and the About label into Brazilian Portuguese; localize relative dates for pt-BR."

Prepared with AI assistance. Maintainers are welcome to request terminology adjustments.

🤖 Generated with Claude Code

felipemontenegro91 and others added 3 commits October 20, 2026 19:05
The English text for settings.gpu.switchToCpu.description changed from
"You can re-download CUDA later" to "You can re-download the GPU backend
later" when ROCm support landed, but the Brazilian Portuguese string still
mentioned CUDA. Translate the current source text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getDateLocale() had no case for pt-BR, so relative timestamps in history,
captures and MCP bindings stayed in English ("5 minutes ago") while the rest
of the interface was in Portuguese. Map pt-BR to date-fns ptBR, following the
existing es/fr/ja/zh pattern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@felipemontenegro91 felipemontenegro91 changed the title fix(i18n): translate custom LLM settings and missing pt-BR labels fix(i18n): complete pt-BR strings and localize relative dates Oct 21, 2026
@felipemontenegro91

Copy link
Copy Markdown
Author

I tested pt-BR as a backport on the v0.5.0 release. The branch is felipemontenegro91:backport/v0.5.0-pt-br, which is tag v0.5.0 plus three changes:

  • the pt-BR file, limited to the 832 keys that exist in v0.5.0;
  • its registration in i18n/index.ts;
  • the same format.ts date-fns change as in this PR.

Three strings whose English source differs between v0.5.0 and main are translated from the v0.5.0 text there.

Results on v0.5.0 (macOS 27.2, Apple Silicon). I built the desktop shell from that branch and ran it with the official v0.5.0 voicebox-server binary, unchanged.

  • The UI opens in Portuguese with the system language set to pt-BR. Settings > General shows "Português (Brasil)". i18next resolves all 832 keys without fallback.
  • Relative dates render in Portuguese, e.g. "há 41 minutos", "há cerca de 1 hora", "há menos de um minuto".
  • Generating speech (Qwen3-TTS 0.6B on MLX, language pt), playback and WAV export all worked from the UI. The cloned profile itself was created through the local API.

What this doesn't cover. The 17 new strings and the switchToCpu update in this PR don't exist in v0.5.0, so they were only validated on main (see the description). I didn't run the desktop app from main.

Remaining English. What's still in English in the pt-BR UI is hard-coded in components, not missing from the locale file, on both v0.5.0 and main. Examples:

  • HistoryTable.tsx: "You've reached the end", "Generating...", "Loading model...", and the "Sample from …" aria-labels;
  • AudioPlayer.tsx: "Close player", "Toggle loop", "Playback position".

I'm happy to send a separate PR moving these into i18n if that's welcome.

Prepared with AI assistance.

This branch has not been deployed

No deployments
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