Skip to content

i18n(fr): add machine translations for all missing keys - #1565

Open
bhuvan-somisetty wants to merge 8 commits into
joinmarket-webui:develfrom
bhuvan-somisetty:i18n/fr-fill-missing
Open

bhuvan-somisetty wants to merge 8 commits into
joinmarket-webui:develfrom
bhuvan-somisetty:i18n/fr-fill-missing

Conversation

@bhuvan-somisetty

@bhuvan-somisetty bhuvan-somisetty commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Fills in all missing French translations with machine translations, as discussed with @theborakompanioni (AI translation beats falling back to English; anyone who finds a better wording can improve it with a PR).

  • fr had 157 of 874 keys, so most of the app showed English. This adds the 717 missing keys, plus the many plural forms fr needs for large numbers
  • Existing fr translations are not touched, only missing keys are added
  • Terminology follows the existing fr strings: portefeuille, Générer (Earn), transaction collaborative, phrase graine, Balayer (Sweep). New terms: "pot" for jar; Fidelity Bond, UTXO, maker/taker stay in English
  • The file now follows the key order of en, which makes future diffs easier to compare

Builds on #1541: that PR prunes stale fr keys and adds the locale checks (variables, <Trans> components, plural forms) this translation was validated against. Only the two i18n(fr): ... commits are new here (the second one keeps description_tx_fees_factor_^0.9.10 a flat key like in en); I'll rebase once #1541 is merged.

Testing

  • src/i18n/locales.test.ts passes for fr: every {{ variable }}, <n> component and $t() reference matches en, and all fr plural forms (one, many, other) are present
  • Checked rendering with i18next, e.g. 0 → Aucun UTXO dans le pot A, 1 → 1 UTXO dans le pot A, 2 → 2 UTXOs dans le pot A, and nested hints like "Un balayage planifié nécessite que vos UTXOs aient 5 confirmations ou plus. Attendez 2 blocs de plus."
  • prettier --check is clean

Visual Demo (For contributors especially)

Image Demo (if applicable):

Storybook with locale fr (before = devel, after = this PR):

Before After
before after
before after
before after
before after

bhuvan-somisetty added a commit to bhuvan-somisetty/jam that referenced this pull request Oct 22, 2026
@bhuvan-somisetty

Copy link
Copy Markdown
Contributor Author

this one sits on top of #1541, so only the last commit is new here. I'll rebase once that's merged. added before/after screenshots too

i18next escapes interpolated values by default. React escapes rendered
text on its own, so values were escaped twice and entities showed up in
the UI, e.g. searching the logs for "won't" displayed
`No matches for "won&joinmarket-webui#39;t".` and error reasons containing `/`, `'` or
`&` were mangled in toasts and alerts.

Disable `interpolation.escapeValue`, as recommended for react-i18next.
No translated text is rendered as raw HTML.

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
- localize the rescan shortcut buttons and the segwit activation tooltip
- add distinct titles for the sidebar trigger (open/close)
- give the branch address table its own keys and an index column label
- move shared keys (copied address toast, jar badge label) to `global`
- pass the reason as a param in the `minimum_makers` error toast
- rename the `defaultValue` interpolation param, which collides with an
  i18next option, to `defaultPercentage`
- remove 5 unused keys from all locales and 42 stale keys from the
  translated locales that no longer exist in the source language
- add tests that guard nested `$t()` references, orphaned keys and
  unknown interpolation variables across all locales

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Extends the locales test to also check that translations
- keep every interpolation variable of the source string (except count)
- use the same <Trans> components as the source string
- contain every plural form their language needs (per Intl.PluralRules)

and fixes what it found:
- de/it/pt-BR/ru/zh-Hans/zh-Hant dropped the reason from the fee config
  loading error
- de showed the "fund wallet" hint with the wrong count in the scheduler
  confirmations hint
- fr dropped the fee from the absolute fee label and rendered stray <0>
  tags in the lock wallet modal
- ru had no few/many forms, so e.g. "3 entries" was shown in English
- it/pt-BR had no many forms (only used for large numbers)

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
fr only had 157 of the 874 keys, so most of the app fell back to English.
Fills in the 717 missing keys (plus the `many` plural forms fr needs)
with machine translations. Existing translations are left as they are.
The file now follows the key order of en.

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
@bhuvan-somisetty

Copy link
Copy Markdown
Contributor Author

small fix: my merge script had split the description_tx_fees_factor_^0.9.10 key on its dots, so fr had it as nested objects. it's a flat key like in en now (a6df35d)

…keys

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>

# Conflicts:
#	src/i18n/locales/de/translation.json
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.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