1.8 KiB
Invitation email language
The administrator chooses Deutsch or English before creating an invitation. The default is the administrator's current interface language. Creation freezes the choice alongside the recipient and link so the sent invitation and subsequent login mail cannot diverge because the browser uses another language.
The invitation stores its language in an optional new column. Login-code requests use the existing account's language, otherwise the valid invitation's language, otherwise the request/browser language. The language is resolved server-side from the invitation token; manually entered or copied invitation links behave identically. On successful registration, the invitation language initializes the new account's existing language preference. Subsequent login emails follow that preference, including later changes made by the user.
The additive Liquibase SQL changeset leaves existing invitations and account preferences unchanged. Old invitations with no language retain their previous browser-language fallback. No token, email address, or tracking data is rewritten by the migration.
Verification covers both language choices against a conflicting request language, subsequent login and user preference changes, legacy invitations, rejection of unsupported administrator choices, and upgrading populated old-schema data twice. H2 integration tests use HikariCP like production, retaining pooled migration connections for H2's compiled check expressions. Browser scenario WJ-062 selects German in a non-German browser session and checks the captured invitation mail, captured login mail, and initialized German interface. All mail delivery in these tests is captured locally.
Verified on 2026-09-10: 17 service/migration tests and Firefox scenarios WJ-042/WJ-062 (2 scenarios, 12 steps) passed. No external test messages were sent.