Repository navigation
feat: english and french on the session language, subscriptions included - #25
Merged
Merged
Conversation
…messages index.html kept a frozen lang="en" whatever the session language: it now defaults to fr (the session default) and App.vue follows session.lang. createI18n uses the composition mode with an english fallbackLocale.
A service subscribing server side (data-fair on a new publication site) sends no locale, its subscriptions were always in the default locale. The forwarded session language is used instead, and an update without locale keeps the stored one.
BatLeDev
marked this pull request as ready for review
November 12, 2026 16:02
…english - The locale of a subscription accepts any 2 letters language code instead of the fr/en enum, and loses its misleading default 'fr'. Event texts are open records and a missing language falls back on the default locale, so a 'de' session no longer gets a 400 from the subscribe embed. The session language is no longer filtered by I18N_LOCALES, which only sets the languages indexed for search. - Notifications are declared in the language their texts were resolved in: the lib notification type only knows fr and en. - The document lang of the UI is the language actually displayed (session language when translated, else english, as vue-i18n fallbackLocale). - API errors of the subscriptions router in english; the push confirmations sent to a new or tested device follow the session language.
…ters code The session language comes from the i18n_lang cookie, which the body schema does not check: a 'fr-FR' stored made every later save of the subscription fail its validation, and a 'constructor' resolved to a function as the notification title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Titles of the subscription, webhook, webhook subscription, device registration and push subscription schemas were in French, like the generated type names (LangueDeLaSouscription). No code imports the renamed types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions - i18n.defaultLocale is 'en': texts missing in a subscription's language, mails, webhooks - the session language without an i18n_lang cookie is this default, not lib-node's 'fr' (a subscription created server side without a locale now stores 'en') - the text index keeps default_language 'fr': each _search entry carries its language, and a change would drop and rebuild the index at the next start - the API doc keeps its 'fr' default: data-fair merges the docs of every service without forwarding Accept-Language Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ritten on a subscription - i18n.defaultLocale back to 'fr' (I18N_DEFAULT_LOCALE): the UIs still default to 'fr' (lib-vue), and existing subscriptions without a locale and webhooks would have switched to english at deploy; english by default needs a platform-wide decision - the session default language stays the configured one - a subscription created or updated for another user (admin mode) takes the language of the body or the stored one, never the admin's session language
….5.4 The lib releases of the fr/en pass: dates in the session language for non French locales, English byte units, English schema bases, translated search-address and date-match-filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gain The default locale stays fr (I18N_DEFAULT_LOCALE), so fixing the index language changed nothing; back to config.i18n.defaultLocale as on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align events on the fr/en conventions of the stack.
localetakes the session language of the request (2 letters code only), an update withoutlocalekeeps the stored one, and a subscription made by an admin for another user never takes the admin's language (subscriptionLocaleinsubscriptions/operations.ts, unit tested).localeaccepts any 2 letters code instead of the fr/en enum with a misleadingdefault: 'fr'; a notification in another language gets the texts of the default locale and is declared in it.fr, now also used as the session language without ani18n_langcookie (I18N_DEFAULT_LOCALEis honored). The events text index keeps a fixeddefault_language: 'fr'so a config change never rebuilds it.langfollows the session (en fallback, RGAA 8.3); vue-i18n in composition mode withfallbackLocale: 'en';<i18n>blocks reordered English first, no text changed; the dev integrations page shows topic titles and log times in the session language.Notification['locale']is now any two letters code in lib-common-types, which matches the subscriptions.Why: data-fair subscribes server side without a locale (new publication site), so those subscriptions were always notified in French.
Heads-up:
localetakes the session language of whoever edits it next.fr(lib-vue) and existing subscriptions and webhooks would have switched at deploy. That needs a platform-wide decision.