fix(loyalty): conditional subtitle on enrollment success page
Some checks failed
Some checks failed
When re-enrolling (already a member), the success page showed two
contradicting messages stacked:
Title: "Vous êtes déjà membre !" (correct, conditional)
Subtitle: "Vous êtes maintenant membre..." (wrong — static)
The title was already x-text-conditional based on
enrollContext.already_enrolled, but the subtitle was a server-side
{{ _('success.message') }} so it always rendered the "you're now a
member" copy regardless of branch.
Make the subtitle conditional the same way:
- new i18n key already_enrolled_message in en/fr/de/lb
("Welcome back — your card is ready whenever you are." and
locale-appropriate equivalents)
- expose success_message + already_enrolled_message in i18nStrings
- subtitle becomes x-text="already_enrolled ? msg2 : msg1"
Found during Test 2 round 2 — cross-store re-enrollment at
FASHIONOUTLET with the email from Test 1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,7 @@
|
||||
"back_to_home": "Zurück zur Startseite"
|
||||
},
|
||||
"already_enrolled_title": "Sie sind bereits Mitglied!",
|
||||
"already_enrolled_message": "Willkommen zurück — Ihre Karte ist einsatzbereit.",
|
||||
"cross_location_message": "Ihre Karte gilt an allen unseren Standorten:",
|
||||
"single_location_message": "Ihre Karte ist bei {store_name} registriert",
|
||||
"available_locations": "Nutzen Sie Ihre Karte an allen unseren Standorten:",
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
"back_to_home": "Back to Home"
|
||||
},
|
||||
"already_enrolled_title": "You're already a member!",
|
||||
"already_enrolled_message": "Welcome back — your card is ready whenever you are.",
|
||||
"cross_location_message": "Your card works at all our locations:",
|
||||
"single_location_message": "Your card is registered at {store_name}",
|
||||
"available_locations": "Use your card at all our locations:",
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
"back_to_home": "Retour à l'accueil"
|
||||
},
|
||||
"already_enrolled_title": "Vous êtes déjà membre !",
|
||||
"already_enrolled_message": "Heureux de vous revoir — votre carte est prête à l'emploi.",
|
||||
"cross_location_message": "Votre carte est valable dans tous nos points de vente :",
|
||||
"single_location_message": "Votre carte est enregistrée chez {store_name}",
|
||||
"available_locations": "Utilisez votre carte dans tous nos points de vente :",
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
"back_to_home": "Zréck op d'Haaptsäit"
|
||||
},
|
||||
"already_enrolled_title": "Dir sidd schonn Member!",
|
||||
"already_enrolled_message": "Wëllkomm zréck — Är Kaart ass prett wann Dir et sidd.",
|
||||
"cross_location_message": "Är Kaart gëllt an all eise Standuerter:",
|
||||
"single_location_message": "Är Kaart ass bei {store_name} registréiert",
|
||||
"available_locations": "Benotzt Är Kaart an all eise Standuerter:",
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
x-text="enrollContext.already_enrolled ? i18nStrings.already_enrolled_title : i18nStrings.success_title">
|
||||
{{ _('loyalty.enrollment.success.title') }}
|
||||
</h1>
|
||||
<p class="text-gray-600 dark:text-gray-400 mb-8">{{ _('loyalty.enrollment.success.message') }}</p>
|
||||
<p class="text-gray-600 dark:text-gray-400 mb-8"
|
||||
x-text="enrollContext.already_enrolled ? i18nStrings.already_enrolled_message : i18nStrings.success_message">
|
||||
{{ _('loyalty.enrollment.success.message') }}
|
||||
</p>
|
||||
|
||||
<!-- Card Number Display -->
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 mb-8">
|
||||
@@ -137,7 +140,9 @@ function customerLoyaltyEnrollSuccess() {
|
||||
},
|
||||
i18nStrings: {
|
||||
success_title: {{ _('loyalty.enrollment.success.title')|tojson }},
|
||||
success_message: {{ _('loyalty.enrollment.success.message')|tojson }},
|
||||
already_enrolled_title: {{ _('loyalty.enrollment.already_enrolled_title')|tojson }},
|
||||
already_enrolled_message: {{ _('loyalty.enrollment.already_enrolled_message')|tojson }},
|
||||
cross_location_message: {{ _('loyalty.enrollment.cross_location_message')|tojson }},
|
||||
single_location_message: {{ _('loyalty.enrollment.single_location_message')|tojson }},
|
||||
available_locations: {{ _('loyalty.enrollment.available_locations')|tojson }},
|
||||
|
||||
Reference in New Issue
Block a user