refactor: complete JS i18n migration for confirm dialogs and toast messages
Migrate 34 hardcoded user-facing strings to use I18n.t() for translation: - CMS: media file operations (5 strings) - Marketplace: Letzshop integration (16 strings) - Messaging: notifications, messages, email templates (5 strings) - Tenancy: platform modules, menu config, theme (5 strings) - Core: menu config, settings, storefront cart (5 strings) - Catalog: product creation (3 strings) - Utils: clipboard operations (2 strings) Added confirmations and messages keys to module locale files. Added I18n.loadModule() calls to JS files that were missing them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,9 @@ function adminPlatformModules(platformCode) {
|
||||
},
|
||||
|
||||
async init() {
|
||||
// Load i18n translations
|
||||
await I18n.loadModule('tenancy');
|
||||
|
||||
// Guard against duplicate initialization
|
||||
if (window._platformModulesInitialized) {
|
||||
moduleConfigLog.warn('Already initialized, skipping');
|
||||
@@ -173,7 +176,7 @@ function adminPlatformModules(platformCode) {
|
||||
},
|
||||
|
||||
async enableAll() {
|
||||
if (!confirm('This will enable all modules. Continue?')) {
|
||||
if (!confirm(I18n.t('tenancy.confirmations.enable_all_modules'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -204,7 +207,7 @@ function adminPlatformModules(platformCode) {
|
||||
},
|
||||
|
||||
async disableOptional() {
|
||||
if (!confirm('This will disable all optional modules, keeping only core modules. Continue?')) {
|
||||
if (!confirm(I18n.t('tenancy.confirmations.disable_optional_modules'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user