feat(loyalty): add full i18n support for all loyalty module pages
Replace hardcoded English strings across all 22 templates, 10 JS files, and 4 locale files (en/fr/de/lb) with ~300 translation keys per language. Uses server-side _() for Jinja2 templates and I18n.t() for JS toast messages and dynamic Alpine.js expressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -150,14 +150,14 @@ function adminLoyaltyMerchantSettings() {
|
||||
|
||||
if (response) {
|
||||
loyaltyMerchantSettingsLog.info('Settings saved successfully');
|
||||
Utils.showToast('Settings saved successfully', 'success');
|
||||
Utils.showToast(I18n.t('loyalty.toasts.settings_saved'), 'success');
|
||||
|
||||
// Navigate back to merchant detail
|
||||
window.location.href = this.backUrl;
|
||||
}
|
||||
} catch (error) {
|
||||
loyaltyMerchantSettingsLog.error('Failed to save settings:', error);
|
||||
Utils.showToast(`Failed to save settings: ${error.message}`, 'error');
|
||||
Utils.showToast(I18n.t('loyalty.toasts.settings_save_failed', {message: error.message}), 'error');
|
||||
} finally {
|
||||
this.saving = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user