Skip to content

fix(i18n): improve French translation quality and automation context - #1022

Merged
GuiBibeau merged 8 commits into
mainfrom
codex/french-translation-quality
Jul 31, 2026
Merged

fix(i18n): improve French translation quality and automation context#1022
GuiBibeau merged 8 commits into
mainfrom
codex/french-translation-quality

Conversation

@GuiBibeau

Copy link
Copy Markdown
Collaborator

What

  • Reviews the full current French catalog and restores idiomatic SDP terminology after PR feat(web): Add complete French UI translation catalogs #685 and subsequent catalog drift.
    • Keeps established Web3 product terms such as Token, Wallet, mint, burn, allowlist, blocklist, on-chain, endpoint, and API Playground.
    • Uses standard French where it is natural, including actif, contrepartie, transfert, fournisseur, devis, brouillon, and déploiement.
  • Adds .github/translation-guidance.json as the French voice and terminology source of truth, with deterministic rejection of discouraged literal terms such as jeton and portefeuille.
  • Gives Eve the missing key's namespace, up to six nearby English strings, approved neighboring translations when available, and the locale glossary on every request.
  • Validates Eve output and complete locale catalogs for placeholders, markup, key coverage, and terminology before writing a release commit.
  • Allows product PRs to add English-only source keys with a temporary English runtime fallback; Eve restores full locale parity on codex/release-main.
  • Adds a CI ownership check that rejects PRs mixing English source and localized catalog edits, while allowing dedicated translation PRs and the automated release branch.
  • Adds Greptile repository rules so reviews do not request French updates on ordinary product PRs and use the French glossary on translation work.

Why

The original French catalog intended to preserve institutional Web3 vocabulary, but later additions drifted into literal and inconsistent translations. Eve previously received only file, key, and the isolated English source string, so it lacked product context and an enforceable glossary. TypeScript's strict catalog parity also forced feature authors to update French manually, conflicting with release automation, while Greptile had no repository instruction explaining that ownership boundary.

Impact

Product authors update English copy only. French users see the English source temporarily if a brand-new key lands before the release sync. Eve then translates the missing keys with local UI context and enforced terminology on the release PR. Dedicated translation-quality PRs remain possible without mixing source and localized copy.

Validation

  • pnpm test:scripts — 45 passed
  • pnpm --filter sdp-web typecheck
  • pnpm --filter sdp-web exec vitest run src/i18n/messages.unit.test.ts — 5 passed
  • pnpm --dir agents/sdp-translation-agent typecheck
  • pnpm --dir agents/sdp-translation-agent build
  • Biome check on all changed code, catalogs, workflow, and configuration
  • Full catalog/key/placeholder/terminology validation — 3,367 French entries
  • Dedicated translation PR policy check

pnpm --filter sdp-web check:i18n still reports pre-existing hard-coded copy in unrelated, untouched files; this PR does not add any of those findings.

@vercel

vercel Bot commented Jul 31, 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 Jul 31, 2026 5:24am
sdp-web Ready Ready Preview Jul 31, 2026 5:24am

Request Review

@GuiBibeau
GuiBibeau marked this pull request as ready for review July 31, 2026 03:47
@GuiBibeau

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Improves French localization quality and automates catalog ownership enforcement.

  • Adds locale guidance, contextual translation requests, and deterministic catalog validation.
  • Allows temporary English fallback for missing localized keys.
  • Adds CI policy checks separating source-catalog and translation-catalog changes.
  • Updates the French catalog to use the approved product terminology.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported fork branch-name spoof is closed by requiring matching non-empty head and base repository identities, with regression coverage for spoofed and missing identity.

Important Files Changed

Filename Overview
.github/scripts/check-catalog-change-policy.mjs Adds source-versus-localized catalog ownership enforcement and securely limits the release exemption to the expected same-repository branch.
.github/workflows/ci.yml Adds the pull-request catalog policy job with trusted base-repository and PR head-repository metadata.
.github/scripts/missing-translations.mjs Adds nearby catalog context, locale guidance, and terminology validation to translation generation.
.github/scripts/translate-missing.mjs Loads translation guidance and applies it during generated-output and complete-catalog validation.
apps/sdp-web/src/i18n/messages.ts Adds English runtime fallback for source keys that have not yet reached localized catalogs.
.github/translation-guidance.json Defines the French voice, preferred Web3 terminology, and forbidden literal translations.
scripts/catalog-change-policy.test.mjs Covers mixed-catalog rejection, legitimate release synchronization, fork branch spoofing, and missing repository identity.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  ProductPR[Product PR] --> English[English source catalogs only]
  TranslationPR[Translation-quality PR] --> Localized[Localized catalogs only]
  English --> Merge[Merge to main]
  Merge --> Eve[Eve finds and translates missing keys]
  Eve --> Release[Same-repository codex/release-main PR]
  Release --> Mixed[Validated source and localized catalogs]
  English --> Policy[Catalog policy CI]
  Localized --> Policy
  Mixed --> Policy
Loading

Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Comment thread .github/scripts/check-catalog-change-policy.mjs Outdated
@GuiBibeau

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@GuiBibeau

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@GuiBibeau

Copy link
Copy Markdown
Collaborator Author

QA-ready: Greptile is 5/5 on the latest head with no unresolved review threads, every required check is green, and the French catalog, Eve context/glossary flow, English-only product PR policy, secure release exemption, and Greptile guidance have been validated.

…ion-quality

# Conflicts:
#	apps/sdp-web/messages/fr/dashboard-policies.json
@GuiBibeau
GuiBibeau enabled auto-merge (squash) July 31, 2026 05:26
@GuiBibeau
GuiBibeau merged commit 32b4d7d into main Jul 31, 2026
34 checks passed
@GuiBibeau
GuiBibeau deleted the codex/french-translation-quality branch July 31, 2026 05:31
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.

2 participants