Skip to content

Add a shared signer-language layer with frozen per-signer locales - #204

Draft
ppstanchev wants to merge 9 commits into
NYLLON-SOFTWARE:mainfrom
ppstanchev:i18n/signer-language-layer
Draft

ppstanchev wants to merge 9 commits into
NYLLON-SOFTWARE:mainfrom
ppstanchev:i18n/signer-language-layer

Conversation

@ppstanchev

@ppstanchev ppstanchev commented Nov 21, 2026 •

Copy link
Copy Markdown

This draft implements the shared signer-language layer discussed in #200. A sender can choose Spanish for one signer and English for another; sending freezes those choices so later installation-default changes cannot alter an existing signing session or its consent evidence.

Rebased onto upstream main at 4d16b882ae87a227fccb062a03244a4399473606. The five commits from @jpalmae’s Spanish signer work in #121 retain their authorship. Thank you for the catalogue and signer UI/email foundation. @thomassicaud’s French work in #78 is credited as a future catalogue contributor. Only English and Spanish are enabled here.

Implemented across all three rounds:

  • Typed partial catalogues with English fallback, placeholder/key validation, missing-key reporting and Intl.PluralRules; Czech plural categories are test-only fixtures.
  • Nullable draft signer languages, sender/API choices, transactional freezing at send, failed-delivery restoration, and language in OpenAPI/API/webhook representations.
  • Signer-language pages, email, privacy/footer/end states, stored PDF dates and certificate evidence. Screen roots and dialog portals declare their language; all six signer email types have an html lang document wrapper.
  • Consent requests validate the displayed language and disclosure version, and retain the exact statement and language in the audit record.
  • Administrator-managed disclosures per language, with validation and acknowledgement of responsibility for each text. The existing scalar remains English; an additive JSONB migration stores translations. Only English legal starting text ships. Missing translations use the English disclosure; the rendered block and audit record identify its actual language separately from the signer’s interface language. Translated disclosure edits now record the accepted responsibility-notice version; clearing a translation does not invent an acknowledgment.
  • Manual and automatic reminders read settings before replacing the signing link, inside their error boundary. Verification errors and resend notices use translated catalogue messages rather than server prose. Stable account-error codes retain remaining-attempt warnings, lock recovery instructions and identity-confirmation instructions, with generic fallbacks for unexpected responses.
  • The requested decline/footer, privacy Last updated/footer and stored-date paths are covered. The page audit also localized expired-download pages and the embedded expired-link hint.
  • The rebase retains upstream team access and approver behavior. Approval/rejection screens, invitations, reminders and certificate evidence carry the language layer, with English/Spanish approver browser coverage.

Compatibility: declinedConfirmation is restored as the original English export from signing-live-shell. Its previous internal use was replaced with localized strings, but downstream imports cannot be ruled out. Rendered decline screens continue using the signer’s locale.

Certificate proposal for maintainer feedback: one certificate per envelope, with its frame in the sender-selected envelope language (defaulting to the installation default). Each signer’s block uses that signer’s language and includes the exact recorded consent statement and localized signing date. Separate certificate copies per language can follow if preferred. Part 11 signature meanings remain canonical English.

Validation on final commit 8bfcc9b30c2b2c0cc9a50cf913b8d64d2363c4f3: all 500 unit/workflow tests, 420 database tests and 26 production Chromium tests passed, with no skips. The full unit/workflow and database runs used isolated Node 24 Linux containers with Linux-native dependencies, Poppler and Bash 5; upstream workflow CRLF was normalized only in the disposable test copy. Typecheck, production build and PDF function-trace checks passed. Lint exits successfully with the same eight warnings in files unchanged from current upstream. Both Greptile findings have failing-before/passing-after regression evidence.

Poppler 25.12.0 checks passed for the document seal and tamper detection, B-LTA seal/archive-timestamp recognition, and both signatures across successive PDF revisions. OpenSSL verifies the archive timestamp token. The additional provider-signing database check also validated both signatures. The mixed-language browser case extracts the signed PDF and checks its stamped dates against the stored date fields.

The upstream English invitation body, subject and plain text remain snapshot-identical; the intentional new lang="en" HTML wrapper is asserted separately. The legacy certificate text snapshot also matches upstream. Newly recorded language/consent evidence and localized dates intentionally change new certificate content as described above.

This PR remains a draft at the owner’s request. Czech, Bulgarian and French catalogues and further reviewed legal starting texts are separate work; no Czech legal text is shipped.

Note

Add a shared signer-language layer with frozen per-signer English and Spanish locales

  • Adds a translation catalogue in i18n.ts supporting English and Spanish, with English fallback, placeholder interpolation, plural-form selection, and catalogue validation tests.
  • Stores a per-signer and per-envelope language. New migrations add signer_language to app_settings and language columns to signers and envelopes, backfilling non-draft records to English. Senders can pick per-signer languages and a certificate language in the UI and API.
  • Renders all signer-facing content in the signer's stored locale: signing screens, consent disclosures, signature-meaning labels, invitations, reminders, verification codes, completion, void, and download-renewal emails, legal footers, audit certificates, and the signer privacy page.
  • Consent recording now requires the submitted disclosure language to match the signer's locale and records the localized consent statement and language.
  • Behavioral Change: API signer and send-options schemas, the replace-signers response, and the consent request body gain new language fields (replaceSignersResponseSchema requires a nullable language on each signer; signerConsentRequestSchema requires language). The signing-live-shell module no longer exports declinedConfirmation. New e2e coverage in signing-language.spec.ts and a mixed-language database test verify the flows.

Macroscope summarized 5e2c2f6. (Automatic summaries will resume when PR exits draft mode or review begins).

@vercel

vercel Bot commented Nov 21, 2026

Copy link
Copy Markdown

@ppstanchev is attempting to deploy a commit to the Basic Intelligence Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The reviewed changes appear safe to merge.

Summary

Adds shared English and Spanish signer text, with languages frozen when an envelope is sent.

  • Signer messages come from an English and Spanish catalogue.
  • Sending an envelope freezes the language choices for its signers and certificate.
  • Signer pages, messages, and emails use each signer’s saved language.
  • Consent records keep the language and words the signer agreed to.
  • Certificates use the envelope language and each signer’s language.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Draft language choices] --> B[Send transaction]
  C[Installation default] --> B
  B --> D[Frozen signer languages]
  B --> E[Frozen certificate language]
  D --> F[Signing pages and emails]
  D --> G[Consent statement and stored dates]
  G --> H[Certificate evidence]
  E --> H
Loading

Reviews (3) · Last reviewed commit: "Retain recovery guidance and disclosure ..." · Reviewed by Greptile

Comment thread src/lib/organization-settings.ts Resolved
@ppstanchev
ppstanchev force-pushed the i18n/signer-language-layer branch from b50a9fe to 8bfcc9b Compare November 22, 2026 22:32

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