Skip to content

feat(web): Add complete French UI translation catalogs - #685

Merged
GuiBibeau merged 11 commits into
solana-foundation:mainfrom
tomiet:chore/french-ui-translations
Jul 21, 2026
Merged

feat(web): Add complete French UI translation catalogs#685
GuiBibeau merged 11 commits into
solana-foundation:mainfrom
tomiet:chore/french-ui-translations

Conversation

@tomiet

@tomiet tomiet commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

Add a complete French (fr) UI message catalog matching the English inventory, and register fr in SDP web i18n config so Accept-Language / sdp-locale can resolve French.

Why

The new UI i18n foundation shipped English-only. French needs a full same-shaped catalog, so locale switching doesn't miss keys, while keeping institutional crypto terms like Token short and layout-stable.

Related PRs

#996

Register fr alongside en with a full matching message inventory, keeping institutional crypto terms like Token short and stable for layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

@tomiet is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a complete French (fr) UI message catalog matching the existing English key inventory and registers fr in the i18n config so locale resolution via Accept-Language / sdp-locale cookie works for French users.

  • Six French JSON catalog slices are added (dashboard-approvals, dashboard-custody, dashboard-issuance, dashboard-payments, dashboard-policies, shared) plus a top-level fr.json, all with 100% key coverage against the English source.
  • config.ts adds "fr" to supportedLocales; messages.ts wires the French slices into the locale map; new unit tests verify inventory parity, typed lookup, and interpolation errors.
  • One translation error in fr/dashboard-payments.json: recurring.resume is set to "CV" (curriculum vitae) instead of "Reprendre", which would display a nonsensical label on the "Resume recurring payment" button for French users.

Confidence Score: 4/5

Safe to merge after fixing the one mistranslated button label in the recurring payments section.

One concrete translation mistake in fr/dashboard-payments.jsonrecurring.resume is "CV" (curriculum vitae) instead of the correct French verb for resuming a payment — would show a meaningless label on the resume button in the French UI. All other catalogs are structurally complete and the key-parity unit test guards against missing keys.

apps/sdp-web/messages/fr/dashboard-payments.json — the recurring.resume key needs a corrected translation.

Important Files Changed

Filename Overview
apps/sdp-web/messages/fr.json Top-level French catalog (Metadata, Home, NotFound, Feedback, Error) — all keys present and French text is correct.
apps/sdp-web/messages/fr/dashboard-approvals.json 110-key French approval catalog — all keys match English inventory; translations are complete and contextually accurate.
apps/sdp-web/messages/fr/dashboard-custody.json Large French custody/wallet catalog (700+ keys) — intentional retention of crypto terms (Wallet, Token, Mint, Freeze) per PR description; no structural issues found.
apps/sdp-web/messages/fr/dashboard-issuance.json Comprehensive French issuance catalog — deeply nested with all keys present and interpolation placeholders intact.
apps/sdp-web/messages/fr/dashboard-payments.json Large French payments catalog — recurring.resume is incorrectly translated as "CV" (curriculum vitae) instead of "Reprendre"; all other keys are structurally complete.
apps/sdp-web/messages/fr/dashboard-policies.json French policies catalog — all keys present and translated correctly.
apps/sdp-web/messages/fr/shared.json French shared catalog covering SharedComponents, dashboardShell, pay, homeWorkspace, validation, etc.; all keys present and well-translated.
apps/sdp-web/src/i18n/config.ts Adds "fr" to supportedLocales, making isAppLocale recognize French cookies/headers; clean, minimal change.
apps/sdp-web/src/i18n/messages.ts Imports all French JSON slices, assembles frMessages, and registers it in the locale map.
apps/sdp-web/src/i18n/messages.unit.test.ts New unit tests verify locale acceptance, key inventory parity, round-trip translation, and interpolation error throwing.
apps/sdp-web/src/i18n/README.md Updated README documents that fr is now a supported locale and captures the workflow for adding future locales.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[HTTP Request] --> B{sdp-locale cookie?}
    B -- valid locale --> C[Use cookie locale]
    B -- missing/invalid --> D{Accept-Language header?}
    D -- matches supported locale --> E[Use Accept-Language locale]
    D -- no match --> F[Fall back to en]
    C --> G[getMessages locale]
    E --> G
    F --> G
    G --> H{locale}
    H -- en --> I[enMessages]
    H -- fr --> J[frMessages]
    I --> K[translate key values]
    J --> K
    K --> L[Rendered UI]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[HTTP Request] --> B{sdp-locale cookie?}
    B -- valid locale --> C[Use cookie locale]
    B -- missing/invalid --> D{Accept-Language header?}
    D -- matches supported locale --> E[Use Accept-Language locale]
    D -- no match --> F[Fall back to en]
    C --> G[getMessages locale]
    E --> G
    F --> G
    G --> H{locale}
    H -- en --> I[enMessages]
    H -- fr --> J[frMessages]
    I --> K[translate key values]
    J --> K
    K --> L[Rendered UI]
Loading

Reviews (9): Last reviewed commit: "fix(web): type-check French message cata..." | Re-trigger Greptile

Comment thread apps/sdp-web/src/i18n/messages.ts Outdated
Comment thread apps/sdp-web/messages/fr/shared.json Outdated
tomiet and others added 9 commits July 13, 2026 12:53
Bring the approved PR branch up to date without rebasing.
Keep the fr shared catalog inventory-matched after upstream language picker landed on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align home and payments activity labels with custody so Transfer is not left in English mid-French UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bring the approved PR branch up to date without rebasing.
Bring the approved PR branch up to date without rebasing.
Keep the fr catalog inventory-matched after English playground path placeholders were deleted on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bring the approved PR branch up to date without rebasing.
Keep the fr payments catalog inventory-matched after upstream added playground hint placeholders.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GuiBibeau

Copy link
Copy Markdown
Collaborator

@greptileai review

@GuiBibeau

Copy link
Copy Markdown
Collaborator

@greptileai review

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sdp-docs Ready Ready Preview, Comment Jul 20, 2026 9:14pm
sdp-web Ready Ready Preview, Comment Jul 20, 2026 9:14pm

Request Review

@GuiBibeau

Copy link
Copy Markdown
Collaborator

QA-ready: the French catalogs are synchronized with latest main (30d1d746), catalog parity/typecheck/unit checks pass, Greptile reviewed the final commit at 5/5 with no unresolved threads, and every GitHub/Vercel check is green. GitHub now only requires one approving maintainer review from someone other than the last pusher before merge.

@GuiBibeau
GuiBibeau merged commit 535c05b into solana-foundation:main Jul 21, 2026
29 checks passed
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.

3 participants