zogstrip
(Régis HANOL)
9. Januar 2026 um 23:59
7
Guter Hinweis, wir scheinen ein paar Übersetzungen zu haben, die nicht dynamisch über die Site-Text-Funktion änderbar sind, weil sie im JS-Bundle fest einprogrammiert sind, anstatt zur Laufzeit verzögert ausgewertet zu werden.
Ich habe einen Entwurf für einen PR, muss aber sicherstellen, dass dadurch keine der Plugins/Themes beeinträchtigt wird.
main ← fix-module-level-i18n-calls
drafted 11:58PM - 09 Jan 26 UTC
When `i18n()` is called at module load time (in const declarations or class prop… erty initializers), translations are captured once and never update. This prevents Site Text customizations from being reflected until a full page reload, even for newly rendered components.
This change moves `i18n()` calls to be resolved lazily:
- `random-quick-tip.gjs`: Store translation keys in `DEFAULT_QUICK_TIPS` and resolve them via `tipLabel`/`tipDescription` getters. Maintains backward compatibility for plugins using `addQuickSearchRandomTip()`.
- `keyboard-shortcuts-help.gjs`: Move modifier key translations into `getModifierKeys()` helper called from the shortcuts getter.
- `template-form-fields.js`: Convert exported const to a function that returns fresh translations on each call.
- Preferences controllers: Convert `subpageTitle` class properties to getters across all 8 preference controllers.
Ref - https://meta.discourse.org/t/-/393096
3 „Gefällt mir“