fix(i18n): convert remaining $t() to server-side _() and fix store dashboard language
Some checks failed
Some checks failed
- Convert storefront enrollment $t() calls to server-side _() to silence dev-toolbar warnings (welcome bonus + join button) - Fix store base template I18n.init() to use current_language (from middleware) instead of dashboard_language (hardcoded store config) so language changes take effect immediately - Switch admin loyalty routes to use get_admin_context() for proper i18n support - Switch store loyalty routes to use core get_store_context() from page_context - Pass program object to storefront enrollment context for server-side rendering - Add LANG-011 architecture rule: enforce $t()/_() over I18n.t() in templates - Fix duplicate file_pattern key in LANG-004 rule (YAML validation error) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
// Wrapped in DOMContentLoaded so deferred i18n.js has loaded
|
||||
document.addEventListener('DOMContentLoaded', async function() {
|
||||
const modules = {% block i18n_modules %}[]{% endblock %};
|
||||
await I18n.init('{{ dashboard_language | default("en") }}', modules);
|
||||
await I18n.init('{{ current_language | default("en") }}', modules);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user