Skip to content

fix(i18n): localize hard-coded history list and audio player labels - #1214

Open
felipemontenegro91 wants to merge 1 commit into
jamiepine:mainfrom
felipemontenegro91:contrib/i18n-hardcoded-history-player
Open

felipemontenegro91 wants to merge 1 commit into
jamiepine:mainfrom
felipemontenegro91:contrib/i18n-hardcoded-history-player

Conversation

@felipemontenegro91

Copy link
Copy Markdown

The history list and the audio player still contain hard-coded English UI strings. They stay in English whatever language is selected (noticed while testing pt-BR, see #1213). This PR moves them to i18n keys and adds pt-BR translations.

What changes

Both components now use useTranslation, as their neighbours already do.

  • HistoryTable.tsx:
    • visible status text: "Generating...", "Loading model...", "Failed";
    • the end-of-list message;
    • the failed-generations summary, now pluralised through i18next and with identical English output;
    • "Clear failed" / "Clearing...";
    • "from {{label}}" in the versions list;
    • row and button aria-labels.
  • AudioPlayer.tsx: play/pause, loop, mute, volume, playback position (aria-valuetext included) and close labels and titles.
  • en/translation.json: 34 new keys under history.* and audioPlayer.*. No existing English string was changed.
  • pt-BR/translation.json: translations for all 34 keys. Other locales fall back to English through fallbackLng, so nothing changes for them.

Overlap with open PRs

Validation (on main 8af7efe + this branch)

  • tsc --noEmit for app passes, and the web production build (tsc && vite build) passes.
  • JSON checks pass: no duplicate keys; every new en key has a pt-BR value; {{...}} variables match between en and pt-BR.
  • Biome 2.3.12 is clean on both locale files. The two components report the same 6 errors / 2 warnings before and after this change: pre-existing a11y/lint findings on unchanged structure, so none are introduced here.
  • I did not run the desktop app from this branch. The strings were identified in the pt-BR UI of a v0.5.0 build, where they render in English.

CHANGELOG.md is intentionally unchanged, because it is generated. Suggested release note: "Localize remaining history list and audio player labels; add Brazilian Portuguese translations."

Prepared with AI assistance.

🤖 Generated with Claude Code

Move the remaining hard-coded English UI strings in HistoryTable and
AudioPlayer (status text, end-of-list message, failed summary, row and
button aria-labels, player titles) to i18n keys and add pt-BR
translations. English values are unchanged; other locales fall back to
English via fallbackLng.

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

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