fix(quick-261029-d9j): pick the mail language from Accept-Language, add mail.fallback_locale, Polish subjects

- preferred_locale and the request locale are normalised (comma lists,
  q-weights, region subtags, case) to pl or en by NormalizeMailLocale, so a
  raw Accept-Language such as en-GB,en;q=0.9 selects the -en templates
- new golem15.user.mail.fallback_locale (default pl) is used when neither
  names a supported language; ResolveMailLocaleFor applies it, and Boot
  rejects any value other than pl or en
- activate, reactivate and restore Polish templates get Polish subjects
- no template, route or payload changes; MailTemplate and
  ResolveMailLocale keep their signatures
This commit is contained in:
Jakub Zych
2026-10-29 09:47:42 +01:00
parent 91af10b572
commit 6bf219f50a
13 changed files with 487 additions and 28 deletions

View File

@@ -15,6 +15,14 @@ activation:
activate_mode: auto
reset_ttl_minutes: 60
activation_ttl_hours: 72
mail:
# The language of this plugin's mails when neither the user's
# preferred_locale nor the request locale (the translate plugin's locale,
# else the Accept-Language header) names one the plugin has mail for (pl or
# en). pl keeps the unsuffixed Polish templates; an English-only site sets
# en (SUMMER_GOLEM15__USER__MAIL__FALLBACK_LOCALE=en). Any other value
# fails boot.
fallback_locale: pl
registration:
allow_registration: true
use_register_throttle: true