mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
On the server only the default (English) translation bundle is loaded at startup. Translating a notification to a user's language called TAPi18n.__(key, params, lang) with lng=lang, but that resource bundle was never added on the server, so i18next fell back to English — every notification email went out in English regardless of the user's profile language. (The client works because switching language calls setLanguage, which loads the bundle.) Add TAPi18n.ensureLanguageLoaded(language), which loads the bundle on demand if i18next does not already have it, and await it before translating in the email notification, EmailLocalization.sendEmail and outgoing webhook paths. Closes #5875 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>