Skip to content

feat: internationalized events and session language in the UI - #46

Merged
BatLeDev merged 4 commits into
masterfrom
i18n-catalogs
Nov 13, 2026
Merged

BatLeDev merged 4 commits into
masterfrom
i18n-catalogs

Conversation

@BatLeDev

@BatLeDev BatLeDev commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Send events to the events service in English and French, and make the UI follow the session language.

  • Every event title is { en, fr }; events picks the language of each subscription. The texts are written next to the function that sends the event (sendCatalogEvent, sendImportEvent, the publication route, and worker/src/lib/events.ts for the import and publication failures), with no shared text table. This is the standard of the data-fair-service skill (references/events.md, data-fair/lib), which takes api/src/imports/service.ts as its model.
  • Topic keys are unchanged (users' subscriptions depend on them). A more precise text is a second parameter, not a new key: the catalog deleted along with its publications, the import replaced by a new one.
  • The event resource.title is now the plain catalog title instead of "Catalogue associé : …". Titles fall back to the id when the remote resource or the dataset has no title.
  • The worker names itself in originator.internalProcess.title (it was name, which the events UI does not show).
  • Fixes the "à échoué" and "resource" typos of the former French strings.
  • <html lang> follows the session language; the static lang of index.html stays en (RGAA 8.3).
  • Log dates use the localized L LT format; resource sizes in the explorer use the session locale.
  • vue-i18n falls back to English on a missing key.

Why: catalogs notifications were French-only strings, so English-speaking users received them in French; part of the platform-wide fr/en pass of the events (with portals, processings, data-fair, simple-directory, customers, agents). Logs and API errors stay in English, by convention.

No release order: the events service already accepts { en, fr } titles.

- Events sent to the events service carry their title and body in fr and en,
  from a single table in shared/event-texts.ts (same pattern as portals).
  The resource title is now the plain catalog title; the associated catalog
  moves to the event body. Fixes the "à échoué" and "resource" typos.
- The document lang follows the session language instead of the fixed "en".
- Log dates use the localized dayjs format, resource sizes the session locale.
- vue-i18n falls back to English on a missing key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added feature and removed feature labels Nov 12, 2026
…able

The { en, fr } titles were keys of a table in shared/, filled by an interpolation helper
and checked by a unit test. Each emitter now writes its own texts:
- sendCatalogEvent and sendImportEvent hold the titles of their actions
- the publication creation writes its title where it is sent
- worker/src/lib/events.ts sends the import and publication failures, once instead of three
  copies of the same event (the internal process carries a title, as the event schema says)
- topic keys unchanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant