Repository navigation
Speak the install's language: French for the whole app, signers and emails - #78
thomassicaud wants to merge 1 commit into
Conversation
…mails An install can now choose its language under Settings, Organization. English stays the default, so existing installs do not change. French is the first translation, and covers everything a person sees. - app_settings.locale (migration 20261118100000_locale), carried to the pages in Branding; the page's html lang follows it. - src/lib/i18n: small typed dictionaries per area (signing, email, app, envelopes, settings, server), no dependency. Each translation is typed against the English one, so a missing message does not compile. - Signing pages, the consent disclosure and every email to signers, copy recipients and senders. - The sender app: dashboard, envelopes, templates, settings, sign-in, sign-up, setup, navigation, contact, 404, the signer privacy notice, and the labels and dates the server builds for those pages. - API errors are translated where they are sent; error classes keep an English message for logs and tests. - Consent disclosure: each language has its own words and version (2026-11-18-fr), so the stored agreement records which language the signer read. - Settings shows the two languages as cards with SVG flags (Windows draws flag emoji as letters). - Account closure accepts the confirmation phrase in either language. Records stay in English: the stored audit trail, its export and the signing certificate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@thomassicaud-asi is attempting to deploy a commit to the Basic Intelligence Team on Vercel. A member of the Team first needs to authorize it. |
[Medium impact] The language choice reaches the main sender and signer workflows on self-hosted installs. Fix the completion page before merging; the two remaining translation gaps are non-blocking. FindingsSummaryAdds an install-wide language setting and French translations for the sender app, signing pages, emails, and server replies.
|
| </main> | ||
|
|
||
| <PublicLegalFooter /> | ||
| <PublicLegalFooter labels={messages.footer} /> |
There was a problem hiding this comment.
Signing completion page crashes.
SigningDoneShell runs on the server, but PublicLegalFooter is a client component. Passing messages.footer now sends its poweredBy function across that boundary, which Next.js cannot serialize. Every visit to the completion page fails, in either language. Let the footer read its own messages, pass only plain values, or make the shell a client component.
| <p className="text-xs font-semibold text-(--tertiary)"> | ||
| Meaning of your signature | ||
| {m.finishDialog.meaningHeading} | ||
| </p> | ||
| <p className="mt-0.5 text-sm font-semibold text-(--fg)"> | ||
| {part11.meaningLabel}: {part11.meaningStatement} |
There was a problem hiding this comment.
Signature meaning stays English. On a French Part 11 signing page, the translated finish dialog still displays
part11.meaningLabel and part11.meaningStatement directly. The server fills both from the English-only SIGNATURE_MEANING_DETAILS, so signers must confirm text such as “Approval: I approve this document.” Translate these displayed words using part11.meaning; the stored record and certificate can remain English as intended.
Comments Outside DiffThese findings could not be posted inline.
|
What and why
The README lists "signing pages in English" as a gap. We run SignuDoc for contracts with French signers and a French team, so we needed the whole thing in French, and wanted to do it in a way that fits upstream and lets others add languages.
An install now picks its language under Settings, Organization. English stays the default, so existing installs don't change. French is the first translation and covers everything a person sees: the signing pages, the consent disclosure, every email, and the sender app.
How it works
app_settings.localecolumn (20261118100000_locale, defaulten, check constraint). It travels to the pages inBranding, which every layout already provides, so client components read it withuseLocale(). The page's<html lang>follows it.src/lib/i18n/holds small dictionaries per area (signing,email,app,envelope,settings,server). The English object is the source and each translation is typed against it (const fr: SigningMessages = {...}), so a missing key doesn't compile. Interpolation and plurals are plain functions. Adding a language = one code inLOCALESplus one object per dictionary.UserMessage(a string or(m, locale) => string), keep an Englishmessagefor logs and tests, and routes translate when they answer (localize(error)). Field errors go throughlocalizeFieldErrors. Status codes and validation are unchanged.locale(defaulten), and dates useIntlwith the install's locale.2026-11-13for English,2026-11-18-frfor French). The version and statement stored with each agreement therefore also record which language the signer read, and switching the install's language makes an open signing page ask for a reload, as a changed version already did.password-messages.ts,pdf-preview-error.ts,EMAIL_NOT_CONNECTED_MESSAGE) take an optional locale too.Left in English on purpose
Review notes
EMAIL_DRIVER=graph#75 (Microsoft 365 email): whichever lands second, I'll add the French strings for the Microsoft 365 status in Settings (already done on our deployment).Testing
npm test318 pass,npm run test:db188 pass (Postgres 17),npm run typecheck,npm run lint(no new warnings),prettier --checkon changed files,npm run build.🤖 Generated with Claude Code
Note
Add French localization for the whole app, signers, and emails
Adds an installation-level locale setting (English or French) that drives all user-facing text.
localecolumn toapp_settings(migration), normalized and persisted throughAppSettings; non-hosted organizations can pick the language in settings with a flag UI. Defaults to English.src/lib/i18n/for app, envelope, signing, settings, email, and server messages, plus a French version of the electronic records disclosure, consent statements, password and PDF-preview messages.UserMessagewhile keeping an EnglishError.message; API routes localize response text using the install locale.SIGN_IN_LOCKED_MESSAGEconstant is removed from sign-in-security.ts.Macroscope summarized 03aee20.