Skip to content

feat(i18n): localized field dates, english schema bases, i18n skill rules - #70

Merged
BatLeDev merged 11 commits into
mainfrom
i18n-pass
Nov 16, 2026
Merged

BatLeDev merged 11 commits into
mainfrom
i18n-pass

Conversation

@BatLeDev

@BatLeDev BatLeDev commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

The lib side of the platform-wide fr/en pass: the code fixes the services and applications were waiting for, and the i18n rules of the skills. French output is unchanged.

  • lib-utils: formatFieldValue dates follow locale: French, the default, keeps its DD/MM/YYYY and DD/MM/YYYY, HH[h]mm patterns, another locale reads the dayjs localized formats of its language (L / L LT) when that dayjs locale is loaded, English otherwise (supporting Spanish later is one import 'dayjs/locale/es.js'). Booleans of a language without labels fall back on Yes/No instead of Oui/Non. formatBytes writes kB/MB/GB in English instead of kb/Mb; French units and the 'fr' default are unchanged.
  • lib-common-types: the theme and access-ref schemas get an English base (the en value of their existing x-i18n-* overrides, which stay as they are); the notification schema is written in English and its locale accepts any two letters code instead of the fr/en enum.
  • lib-vuetify: search-address and date-match-filter get <i18n> blocks like the other components; the icon-only calendar button gets a title and an aria-label.
  • Skills: data-fair-processing language policy (logs and errors in English, forms in English base); data-fair-service i18n reference: dates through useLocaleDayjs(), numbers through toLocaleString(locale) without options, document lang through watchEffect only (no unhead), reading rule of the { en, fr } values of registry artefacts; data-fair-app documents the date formats per locale and its summary line on numbers is aligned.

Why: the remaining lib items of the platform-wide fr/en pass, without changing anything for French users.

Heads-up:

  • Type names generated from titles change in common-types: 61 secondary types of theme, access-ref and notification are renamed (UnMembreDeLOrganisation → AnOrganizationMember, CouleurPrincipale → PrimaryColor…). Constants and the main types (Theme, Colors, AccessRef, Notification) keep their names and no service imports the renamed ones, but an outside consumer would break: pick the version accordingly.
  • Notification['locale'] widens from 'fr' | 'en' to string (pattern ^[a-z]{2}$).
  • Applications that pass a non-French locale to formatFieldValue (the skill's documented call) get dates in their language (English for now) after the bump instead of French ones: that is the fix, French sessions are untouched.
  • lib-utils now extends dayjs with the localizedFormat plugin, like lib-vue already does.
  • Tested before release with the local build copied into the services: simple-directory and events type-check, the 12 compiled simple-directory forms only differ on the hidden preload links field, events unit tests pass, portals and agents keep exactly their existing type errors; search-address checked in the browser in app-dashboards in French and English.
  • access-ref keeps "Tous les départements" / "Racine de l'organisation uniquement" in French: they live in a getItems expression that x-i18n does not reach.

BatLeDev and others added 11 commits November 16, 2026 10:11
- config forms: English base + x-i18n-*.fr for every public and new plugin, a French-only
  one translated fully the next time its schema is touched
- logs and thrown errors in English
- what a plugin writes into data (titles, columns, x-labels, product variants) stays in
  French for now: renaming a column breaks what is built on it
- schema examples in English base with their French in x-i18n

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

- dates: useLocaleDayjs() at every call site (getLocaleDayjs(lang) outside a component), never
  new Date().toLocaleString(locale), with the one exception of formats dayjs has no localized token for
- numbers: toLocaleString(locale) without options is the simplest and fastest form, services use it
  and declare no numberFormats; a named n() format only for numbers with options in a render loop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agents, registry and simple-directory dropped unhead, which only set the lang attribute: every
service now uses the same watchEffect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dayjs

- new dayjs option, usually useLocaleDayjs().dayjs: dates use its localized L / L LT
  formats; without it the French DD/MM/YYYY patterns stay, so current callers see no change
- dateTimeInOwnTimeZone takes an optional dayjs factory
- booleans fall back on Yes/No instead of Oui/Non for a language without labels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
formatBytes wrote kb/Mb, which read as kilobits and megabits.
The French units and the French default locale are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cation schemas

- theme and access-ref: the base title and description take the English value of their
  x-i18n overrides, the overrides themselves are unchanged (French users see no difference)
- theme preload links (hidden in forms) and notification schema written in English
- notification locale accepts any two letters language code instead of the fr/en enum

Constants and the main types (Theme, Colors, AccessRef, Notification) keep their names. The
secondary types generated from titles are renamed (UnMembreDeLOrganisation becomes
AnOrganizationMember…): none is imported by the services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both had their texts in French only. They get <i18n> blocks like the other lib-vuetify
components, and the icon-only calendar button of date-match-filter gets a title and an
aria-label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The injected dayjs carried its own language beside the locale option: a call could format
numbers in English and dates in French. formatFieldValue now loads the fr locale and the
localizedFormat plugin itself and formats dates in the language of locale when localizedDates
is set; without it the French patterns stay. The app skill documents the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No option needed: French, the default, keeps DD/MM/YYYY and DD/MM/YYYY, HH[h]mm, every other
locale reads the English localized formats (L, L LT), like the other fallbacks of the module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
formatFieldValue gave the English formats to every non French locale: a future Spanish session
would have read 01/15/2024. It now asks dayjs for the formats of the language, which uses them
when its dayjs locale is loaded and falls back on English otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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