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:
2026-03-13 19:53:17 +01:00
parent 826ef2ddd2
commit 694a1cd1a5
37 changed files with 2916 additions and 563 deletions

View File

@@ -46,7 +46,7 @@ function customerLoyaltyEnroll() {
this.program = null;
} else {
console.error('Failed to load program:', error);
this.error = 'Failed to load program information';
this.error = I18n.t('loyalty.enrollment.errors.load_failed');
}
} finally {
this.loading = false;
@@ -89,9 +89,9 @@ function customerLoyaltyEnroll() {
} catch (error) {
console.error('Enrollment failed:', error);
if (error.message?.includes('already')) {
this.error = 'This email is already registered in our loyalty program.';
this.error = I18n.t('loyalty.enrollment.errors.email_exists');
} else {
this.error = error.message || 'Enrollment failed. Please try again.';
this.error = error.message || I18n.t('loyalty.enrollment.errors.failed');
}
} finally {
this.enrolling = false;