Skip to content

Add German admin UI and localise operator-facing emails - #276

Open
Mehr-Vertrieb wants to merge 5 commits into
Calnode:mainfrom
Mehr-Vertrieb:claude/deutsche-uebersetzung
Open

Mehr-Vertrieb wants to merge 5 commits into
Calnode:mainfrom
Mehr-Vertrieb:claude/deutsche-uebersetzung

Conversation

@Mehr-Vertrieb

@Mehr-Vertrieb Mehr-Vertrieb commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Ships a German admin catalogue (frontend/src/lib/i18n/de.json, formal Sie, terse) as a third admin locale. en stays the only bundled catalogue; fr and de load on demand (below).
  • Host notifications (new booking, cancellation, reschedule), the login link, password reset, team invitation and the email-settings test message read their text from the booker catalogue in the operator's fallback language (server_settings.fallback_locale). With no fallback set, or English, the output is byte-identical to before. Attendee emails still follow the attendee's own locale.
  • Polishes German booker wording (verschieben instead of umbuchen, a few idiomatic fixes), mirrored in de-x-neutral; glossary updated. The exact before/after strings are listed below.

Admin catalogues are lazy

Only en is statically imported (source of truth and per-key fallback). fr/de are dynamic imports behind loadCatalog(), fetched when the locale is the starting one or is selected.

  • The locale store changes only once the catalogue is in, so a switch is a single reactive update and never shows raw keys or the old language half-translated.
  • The root +layout.ts load awaits the starting locale, so the first render waits for its catalogue (no flash of English for a German operator).
  • If the import fails, the locale still applies and every string reads as English; <html lang> says en, the stored preference is kept so the next load retries.
  • Adding a locale is one entry in loaders plus the name in ADMIN_LOCALES (CONTRIBUTING.md updated).

Measured with pnpm build, JS only, gzip at level 6. "Initial" is the entry chunks plus the root layout node and everything it imports statically, i.e. what every admin page load pays; page-specific chunks are excluded.

Before After
Initial JS, raw 496,945 B 344,742 B (-31%)
Initial JS, gzip 164,974 B 117,788 B (-29%)
Chunk with the catalogues, raw / gzip 222,970 B / 71,475 B (en + fr + de in one shared chunk) en 67,299 B / 22,876 B (in the initial set)
fr chunk, raw / gzip in the shared chunk 79,246 B / 24,746 B, on demand
de chunk, raw / gzip in the shared chunk 78,937 B / 25,443 B, on demand

An English admin now downloads en only; a German admin downloads en + de. Checked in a real browser against vite preview: English default requests no fr/de chunk; a stored de shows German from the first paint (a mutation observer saw no English headline) and fetches only the de chunk; with the de chunk blocked the page renders English without errors.

German wording changes: exact before / after

Neither maintainer reads German, so these are generated from the diff of internal/i18n/locales/de.json and de-x-neutral.json against main, nothing summarised. Keys are unchanged; only the German value differs. As with the other locales, this is contributed copy, not independently reviewed.

de (formal): 22 changed values

Key Before After
could_not_load_times Termine konnten nicht geladen werden. Bitte versuchen Sie es erneut. Verfügbare Zeiten konnten nicht geladen werden. Bitte versuchen Sie es erneut.
times_shown_in Zeiten angezeigt in Zeitangaben in
location_in_person Persönlich Vor Ort
booking_already_cancelled_text Diese Buchung wurde storniert. Um einen neuen Termin zu buchen, besuchen Sie die Veranstaltungsseite. Diese Buchung wurde storniert. Einen neuen Termin können Sie über die Buchungsseite vereinbaren.
scheduled_for Geplant für Termin am
reschedule Umbuchen Verschieben
confirm_reschedule_question Umbuchung bestätigen? Verschiebung bestätigen?
was_label Vorher Bisher
now_label Jetzt Neu
confirm_reschedule Umbuchung bestätigen Verschiebung bestätigen
rescheduling Wird umgebucht… Wird verschoben…
booking_rescheduled_title Buchung umgebucht Termin verschoben
booking_rescheduled_prefix Ihre Buchung wurde verschoben auf Ihr Termin wurde verschoben auf
reschedule_failed_error Die Umbuchung ist fehlgeschlagen. Bitte versuchen Sie es erneut. Das Verschieben ist fehlgeschlagen. Bitte versuchen Sie es erneut.
email_rescheduled_lead Ihre Buchung wurde umgebucht. Ihr Termin wurde verschoben.
email_reminder_lead Dies ist eine Erinnerung: Ihr Termin steht bevor. Wir erinnern Sie an Ihren bevorstehenden Termin.
email_label_was Vorher Bisher
email_label_now Jetzt Neu
email_calendar_google Google Calendar Google Kalender
email_manage_link_intro Zum Umbuchen oder Stornieren: Zum Verschieben oder Stornieren:
email_manage_link_intro_reschedule Zum erneuten Umbuchen oder Stornieren: Zum erneuten Verschieben oder Stornieren:
email_subject_rescheduled Buchung umgebucht: %s Termin verschoben: %s

de-x-neutral: 22 changed values

Key Before After
could_not_load_times Termine konnten nicht geladen werden. Bitte erneut versuchen. Verfügbare Zeiten konnten nicht geladen werden. Bitte erneut versuchen.
times_shown_in Zeiten angezeigt in Zeitangaben in
location_in_person Persönlich Vor Ort
booking_already_cancelled_text Diese Buchung wurde storniert. Ein neuer Termin lässt sich über die Veranstaltungsseite buchen. Diese Buchung wurde storniert. Ein neuer Termin lässt sich über die Buchungsseite vereinbaren.
scheduled_for Geplant für Termin am
reschedule Umbuchen Verschieben
confirm_reschedule_question Umbuchung bestätigen? Verschiebung bestätigen?
was_label Vorher Bisher
now_label Jetzt Neu
confirm_reschedule Umbuchung bestätigen Verschiebung bestätigen
rescheduling Wird umgebucht… Wird verschoben…
booking_rescheduled_title Buchung umgebucht Termin verschoben
booking_rescheduled_prefix Die Buchung wurde verschoben auf Der Termin wurde verschoben auf
reschedule_failed_error Die Umbuchung ist fehlgeschlagen. Bitte erneut versuchen. Das Verschieben ist fehlgeschlagen. Bitte erneut versuchen.
email_rescheduled_lead Die Buchung wurde umgebucht. Der Termin wurde verschoben.
email_reminder_lead Dies ist eine Erinnerung: Der Termin steht bevor. Erinnerung an den bevorstehenden Termin.
email_label_was Vorher Bisher
email_label_now Jetzt Neu
email_calendar_google Google Calendar Google Kalender
email_manage_link_intro Zum Umbuchen oder Stornieren: Zum Verschieben oder Stornieren:
email_manage_link_intro_reschedule Zum erneuten Umbuchen oder Stornieren: Zum erneuten Verschieben oder Stornieren:
email_subject_rescheduled Buchung umgebucht: %s Termin verschoben: %s

New host/operator email strings (22 keys, in de and de-x-neutral, plus en)

These are added, not changed, so there is no "before". de:

Key German
email_host_subject_new Neue Buchung: %[1]s mit %[2]s
email_host_subject_cancelled Buchung storniert: %[1]s mit %[2]s
email_host_subject_rescheduled Termin verschoben: %[1]s mit %[2]s
email_host_new_lead Sie haben eine neue Buchung.
email_host_cancelled_lead Eine Buchung wurde storniert.
email_host_rescheduled_lead Ein Termin wurde verschoben.
email_magic_subject Ihr Anmeldelink für Calnode
email_magic_text Über den folgenden Link melden Sie sich bei Calnode an. Er ist 15 Minuten gültig und kann einmal verwendet werden.
email_magic_html_intro Über die Schaltfläche unten melden Sie sich bei Calnode an. Der Link ist 15 Minuten gültig und kann einmal verwendet werden.
email_magic_button Bei Calnode anmelden
email_link_paste Oder kopieren Sie diesen Link in Ihren Browser:
email_ignore_unrequested Falls Sie das nicht angefordert haben, können Sie diese E-Mail ignorieren.
email_reset_subject Calnode-Passwort zurücksetzen
email_reset_text Über den folgenden Link legen Sie ein neues Calnode-Passwort fest. Er ist 1 Stunde gültig und kann einmal verwendet werden.
email_reset_html_intro Über die Schaltfläche unten legen Sie ein neues Calnode-Passwort fest. Der Link ist 1 Stunde gültig und kann einmal verwendet werden.
email_reset_button Neues Passwort festlegen
email_reset_ignore Falls Sie das nicht angefordert haben, können Sie diese E-Mail ignorieren – Ihr Passwort bleibt unverändert.
email_invite_subject Einladung zu Calnode
email_invite_text %s hat Sie zu Calnode eingeladen.

Über den folgenden Link richten Sie Ihr Konto ein. Der Link ist 7 Tage gültig und an diese E-Mail-Adresse gebunden.
email_invite_ignore Falls Sie keine Einladung erwartet haben, können Sie diese E-Mail ignorieren.
email_test_subject [TEST] Calnode-E-Mail-Einstellungen
email_test_text Dies ist eine Test-E-Mail von Calnode. Wenn sie angekommen ist, funktionieren Ihre E-Mail-Einstellungen.

de-x-neutral:

Key German
email_host_subject_new Neue Buchung: %[1]s mit %[2]s
email_host_subject_cancelled Buchung storniert: %[1]s mit %[2]s
email_host_subject_rescheduled Termin verschoben: %[1]s mit %[2]s
email_host_new_lead Eine neue Buchung ist eingegangen.
email_host_cancelled_lead Eine Buchung wurde storniert.
email_host_rescheduled_lead Ein Termin wurde verschoben.
email_magic_subject Anmeldelink für Calnode
email_magic_text Über den folgenden Link erfolgt die Anmeldung bei Calnode. Er ist 15 Minuten gültig und kann einmal verwendet werden.
email_magic_html_intro Über die Schaltfläche unten erfolgt die Anmeldung bei Calnode. Der Link ist 15 Minuten gültig und kann einmal verwendet werden.
email_magic_button Bei Calnode anmelden
email_link_paste Alternativ diesen Link in den Browser kopieren:
email_ignore_unrequested Falls dies nicht angefordert wurde, kann diese E-Mail ignoriert werden.
email_reset_subject Calnode-Passwort zurücksetzen
email_reset_text Über den folgenden Link lässt sich ein neues Calnode-Passwort festlegen. Er ist 1 Stunde gültig und kann einmal verwendet werden.
email_reset_html_intro Über die Schaltfläche unten lässt sich ein neues Calnode-Passwort festlegen. Der Link ist 1 Stunde gültig und kann einmal verwendet werden.
email_reset_button Neues Passwort festlegen
email_reset_ignore Falls dies nicht angefordert wurde, kann diese E-Mail ignoriert werden – das Passwort bleibt unverändert.
email_invite_subject Einladung zu Calnode
email_invite_text Einladung zu Calnode von %s.

Über den folgenden Link lässt sich das Konto einrichten. Der Link ist 7 Tage gültig und an diese E-Mail-Adresse gebunden.
email_invite_ignore Falls keine Einladung erwartet wurde, kann diese E-Mail ignoriert werden.
email_test_subject [TEST] Calnode-E-Mail-Einstellungen
email_test_text Dies ist eine Test-E-Mail von Calnode. Wenn sie angekommen ist, funktionieren die E-Mail-Einstellungen.

Admin catalogue (frontend/src/lib/i18n/de.json)

New file, 1,339 keys at full parity with en.json (checked by the catalogue tests), so there is no before/after. Placeholders and plural forms are checked mechanically; the wording is the same kind of contributed, unreviewed copy.

Other changes in this update

  • Merged current main (conflicts were in CHANGELOG.md only). The merge brought 14 new en.json keys (booking deletion, next available time, outbound phone location) that de.json lacked; they are translated here.
  • applyHostInvite now sets HostLocale, so reschedule and reassignment host emails follow the operator's language too (they previously went out in English because only hostBookingData set it). Handler tests cover both paths.
  • i18n.test.ts, the suite CI runs, now iterates every translation like catalog.test.ts.
  • BookingData.Locale doc block and the mailer test name no longer say hosts always stay English.
  • docs/ARCHITECTURE.md section 23 updated (admin locales, lazy catalogues, operator-language emails).
  • CHANGELOG notes that the nine other shipped locales (fr, fr-CA, es, it, nl, pl, pt, sv, el) do not have the 22 new email keys yet, so a host on one of those fallback languages gets a mixed-language email (translated greeting and labels, English subject and lead) instead of the previous all-English one.

Verification

go vet, gofmt, go build, go test ./..., svelte-check, check:i18n, pnpm build, pnpm test:visual and the node --test copy of the catalogue tests all pass locally.

🤖 Generated with Claude Code

- Ship a German admin catalogue (frontend/src/lib/i18n/de.json) and
  register it in ADMIN_LOCALES; catalogue tests now cover every
  translation, not only French.
- Host notifications, login link, password reset, team invitation and
  the email test message read their text from the booker catalogue in
  the operator's fallback language. English output is unchanged.
- Polish German booker wording (verschieben instead of umbuchen, a few
  idiomatic fixes), mirrored in de-x-neutral; glossary updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iakVADVRvb5zkK5sEwxtg
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@Mehr-Vertrieb

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Nov 26, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The host-email wiring misses two send paths: reschedule (manage page / MCP) and reassignment never populate HostLocale, so those host emails still go out in English even when a German fallback locale is configured.

Approach: sound in shape — a dedicated HostLocale keeps the attendee's language and the operator's language from bleeding into each other, and the German admin catalogue slots into the existing ADMIN_LOCALES/catalogs architecture — but the host-locale plumbing stops short of every send site it promises.

Reviewed changes — read the full 19-file diff and ran the relevant suites (go test ./internal/i18n/ ./internal/mailer/, node --test src/lib/i18n/catalog.test.ts, check-i18n.mjs, gofmt -l).

  • German admin catalogue. New frontend/src/lib/i18n/de.json (1,325 keys, formal Sie) registered in catalog.ts; key parity, placeholders, plurals and anchor guards in catalog.test.ts now iterate every translation. Verified against en.json structure and read the whole catalogue for obvious mistranslations.
  • Host/operator email localisation. New BookingData.HostLocale, operatorLocale(ctx) helper, and T/Tf-driven host confirmation/cancellation/reschedule templates plus login-link, reset, invite and settings-test emails. English output is byte-identical to the previous hardcoded copy.
  • German booker wording. verschieben replaces umbuchen, mirrored in de-x-neutral.json, with the glossary extended.
  • hostBookingData stamps HostLocale from branding.FallbackLocale; the admin event-type preview now uses a 24-hour clock for every non-English admin locale.

⚠️ Reschedule and reassignment host emails still go out in English

SendRescheduleToHost and the reassignment confirmation only localise when BookingData.HostLocale is set, but hostBookingData is the only site that sets it. rescheduleSideEffects and reassign build their host copy inline, so a German instance still sends those two host notifications in English — and reschedule is explicitly listed in the changelog.

Technical details
# HostLocale not set on two host-send paths

## Affected sites
- `internal/handler/manage_handler.go:335-338` — `hd := d; h.applyHostInvite(...); mailer.SendRescheduleToHost(...)`; `d` comes from `loadCancellationData` + `applyBranding`, neither of which sets `HostLocale`.
- `internal/handler/reassign.go:221-226` — same pattern for the new host's confirmation email.
- `internal/handler/booking_handler.go:1101` — `hostBookingData` is currently the only assignment.

## Required outcome
Every `SendConfirmationToHost` / `SendCancellationToHost` / `SendRescheduleToHost` call carries the operator locale, so the reschedule notification the changelog promises is actually German on a German instance.

## Suggested approach (optional)
Set `hd.HostLocale = h.operatorLocale(ctx)` inside `applyHostInvite`, which all three paths already call; the assignment in `hostBookingData` then collapses into the same helper (and stops duplicating `i18n.Get(loadBranding(ctx).FallbackLocale)`).

## Open questions for the human (optional)
`TestHostEmails_followHostLocale` calls the mailer directly with `HostLocale` pre-set, so it cannot catch a handler that never populates the field. A handler-level assertion (or setting the field centrally) would close that hole.

ℹ️ Nine shipped locales now get half-translated host emails

Only en, de and de-x-neutral received the 22 new keys. Locale.T falls back per key to English, but the host templates also reuse long-standing keys (email_greeting, email_label_*) that every locale already translates — so a French, Spanish, Italian, Dutch, Polish, Portuguese, Swedish, Greek or Canadian-French operator now gets a translated greeting and labels beside an English subject and lead. That is less coherent than the uniformly English mail shipped before.

Technical details
# Per-key fallback mixes languages in host emails

## Affected sites
- `internal/i18n/locales/{fr,fr-CA,es,it,nl,pl,pt,sv,el}.json` — 169/191 keys; all 22 new keys missing.
- `internal/i18n/locales/en.json:147-168` — the new `email_host_*`, `email_magic_*`, `email_reset_*`, `email_invite_*`, `email_test_*` block.
- `internal/mailer/booking.go:468-559` — host templates mix `email_greeting`/`email_label_*` (translated everywhere) with the new keys (English fallback).

## Required outcome
Host email language is either coherent for a locale or uniformly English.

## Suggested approach (optional)
Translate the 22 keys in the other shipped locale files (the structural guards stay green either way). If that is out of scope, say in the changelog that the new copy currently ships in German and English only, so French/Spanish hosts get a mixed email rather than the previous all-English one.

ℹ️ docs/ARCHITECTURE.md §23 still says host emails stay English and that the admin ships only en + fr

Line 1306 states "Host-facing sends deliberately pass a nil locale and stay English" and line 1263 lists the admin SPA as en + fr. This PR invalidates both; §23 is also where the new rule (the fallback locale drives operator-facing email) belongs, and the repo convention is that behaviour changes update that section in the same PR.

Technical details
# ARCHITECTURE §23 not updated for this PR's behaviour change

## Affected sites
- `docs/ARCHITECTURE.md:1263` — admin SPA row: "`en` + `fr`".
- `docs/ARCHITECTURE.md:1268-1276` — prose that says `fr.json` is the only translation.
- `docs/ARCHITECTURE.md:1303-1306` — "Host-facing sends deliberately pass a nil locale and stay English."

## Required outcome
§23 describes the shipped admin locales (`en`, `fr`, `de`) and the operator-email language rule (`server_settings.fallback_locale` drives host/operator emails; attendee emails stay per-booking).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash | 𝕏

Comment thread internal/mailer/booking.go Resolved
Comment thread frontend/src/lib/i18n/catalog.test.ts Resolved
Comment thread frontend/src/lib/i18n/de.json Resolved
@shockalotti

Copy link
Copy Markdown
Contributor

Reviewing properly now that the product questions are settled.

Accepted as-is: the German admin catalogue as a third locale, the operator-email wording following the instance fallback language, and keeping the two catalogue systems separate with the glossary. The feature is good.

One thing blocks it: adding a third catalogue currently makes every admin download all three.

catalog.ts statically imports them into one catalogs object:

import en from './en.json'
import fr from './fr.json'
const catalogs = { en, fr }

Sizes: en 76 KB, fr 88 KB, and this PR adds de at 86 KB. An English-speaking operator who will never read French or German currently pays for ~250 KB of JSON (roughly 70-80 KB gzipped) on every admin page load. That was already a known cost at two; the third makes it indefensible.

Please make the non-English catalogues lazy:

  • keep en static, since it is the source of truth and the per-key fallback;
  • dynamic-import fr, de and anything later, keyed by ADMIN_LOCALES, on locale selection and on initial resolve when the resolved locale is not English;
  • hold the first render (or show a loading state) until the active catalogue is in, so nothing flashes raw keys.

That leaves an English admin on ~76 KB instead of ~250 KB, and a German admin on en + de only. It is also the difference between "adding a locale is cheap" and "every locale taxes every operator".

On the German wording changes: accepted, with one request. Neither maintainer reads German, so please list the exact before/after strings in the description. We will record the same provenance caveat as every other locale here: contributed, not independently reviewed. Splitting it into its own PR would not help, because the risk is copy quality rather than code.

Mehr-Vertrieb and others added 4 commits December 2, 2026 13:10
Only en.json stays in the bundle (source of truth and per-key fallback).
fr and de are dynamic imports behind loadCatalog(), fetched when the locale
is the starting one or is selected, so an English admin no longer downloads
them. Initial JS drops from 497 kB to 345 kB raw (165 kB to 118 kB gzip).

The locale store switches only once the catalogue is in, and the root
+layout.ts load holds the first render until the starting locale is ready,
so nothing flashes in the wrong language and a switch stays one reactive
update. A failed import leaves the locale applied with English strings
(html lang reports English) and keeps the stored preference.

Tests: i18n.test.ts, the suite CI runs, now iterates every translation
(en/fr/de parity, placeholders, plurals, anchors) like catalog.test.ts;
store tests cover pending switches, overlapping switches and load failure.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The upstream merge added 14 keys to en.json (booking deletion, next
available time, outbound phone location) that de.json lacked; the key
parity test caught it. Also capitalise "wir" after the blank line in the
reminder preview, as en/fr and the real email_reminder_lead do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
applyHostInvite now sets HostLocale, which reschedule and reassignment
call but never got from hostBookingData, so those host emails stayed
English on a German instance. hostBookingData drops its own assignment.
Handler tests cover the reschedule and reassign paths.

Update the BookingData.Locale doc block and rename the mailer test that
still said hosts always stay English. Bring ARCHITECTURE section 23 up to
date (admin locales, lazy catalogues, operator-language emails) and note in
the CHANGELOG that the nine locales without the new keys send mixed-language
host emails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No blocking issues — the prior review's host-locale gap is fixed, and the new lazy-loading path is covered by the suites CI actually runs; two non-blocking gaps remain.

Approach: sound — applyHostInvite now stamps the operator locale once for every host send, and the admin catalogue lazy load is gated by a store that only switches once the catalogue is in, so no page renders half-translated.

Reviewed changes — reviewed the delta since the prior pullfrog review at d02a175 (upstream merge, lazy admin catalogues, host-locale tests, doc updates) and ran go test ./internal/i18n ./internal/mailer ./internal/handler, node --test frontend/src/lib/i18n/catalog.test.ts, pnpm test:visual (35 tests), pnpm check, check-i18n.mjs and pnpm build at c342738.

  • One locale source for host emails. applyHostInvite sets BookingData.HostLocale from operatorLocale(ctx), so reschedule and reassignment — which build their host copy outside hostBookingData — now follow the operator's fallback language; host_locale_internal_test.go asserts both at the handler level.
  • Admin catalogues load on demand. Only en is bundled; fr and de are dynamic imports behind loadCatalog, the root +layout.ts waits on localeReady before the first render, and a switchSeq guard drops a superseded switch. A failed chunk resolves to English per key instead of throwing.
  • Catalogue tests moved into the CI suite. i18n.test.ts now iterates {fr, de} for key, placeholder, plural and anchor parity, so pnpm test:visual guards de.json (the node:test copy still runs standalone).
  • Docs and changelog cover the operator-language rule, the three admin locales, lazy loading and the mixed-language caveat for the nine locales that still lack the 22 email keys; BookingData.Locale's comment and the mailer test name were corrected.

Non-blocking

  • German booker catalogues are missing the three phone-outbound keys. The merge of upstream #273 brought location_phone_outbound, phone_outbound_number and err_phone_required into en.json (and pl.json), but de.json and de-x-neutral.json still lack them, so a German visitor booking a phone-outbound event type sees the English field label, location label and validation error. de.json, en.json:65.
  • The first admin page load persists the browser-detected locale. localeReady calls apply(), which writes calnode-admin-locale, so navigator.languages is only ever a first-visit fallback, and a tab that loaded earlier can overwrite a locale chosen in another tab at startup. Persisting only on an explicit setLocale keeps the documented resolution order. index.ts:75.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash | 𝕏

@Mehr-Vertrieb

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review. Pushed to the branch:

Lazy catalogues. Only en is static now. fr and de are dynamic imports behind loadCatalog(), loaded when the locale is the starting one or is selected, keyed by loaders/ADMIN_LOCALES. The store changes locale only after the catalogue is in, and the root +layout.ts holds the first render until the starting locale is ready, so nothing flashes raw keys or English. A failed import falls back to English per key (and <html lang> reports en). Initial admin JS goes from 496,945 B to 344,742 B raw (164,974 B to 117,788 B gzip); an English admin no longer downloads fr or de. Method and the per-chunk numbers are in the description.

Before/after strings. The description now lists every changed German value for de and de-x-neutral (22 each), generated from the diff against main, plus the 22 new host-email strings. I marked them as contributed, not independently reviewed, as you suggested.

Also in this push: merged main (the PR was conflicting), and fixes for the review bot's findings: reschedule and reassignment host emails now follow the operator's language, i18n.test.ts (the suite CI runs) covers de, a capitalisation fix, ARCHITECTURE section 23, and a CHANGELOG note that the nine other shipped locales get mixed-language host emails until they add the new keys.

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.

2 participants