إمساك جيد، يبدو أن لدينا بعض الترجمات التي لا يمكن تعديلها ديناميكيًا عبر ميزة نص الموقع لأنها مضمنة في حزمة JavaScript بدلاً من تقييمها بكسل في وقت التشغيل.
لدي مسودة طلب سحب (PR) ولكني بحاجة إلى التأكد من أنها لا تكسر أيًا من المكونات الإضافية/السمات
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
إعجابَين (2)