fix(catalog/ford): disambiguate identical catCode buttons + relabel "Model Yılı" → "Varyant"
Two visible defects when a user picks a Ford model (variant selector step):
1. **N identical buttons.** Ford's `modelFamilyToModelList` gives every sub-catCode
the same caption — just the family name. parseFordCatCodesForFamily returned
`[{code:CBV,name:Kuga},{code:CBS,name:Kuga},{code:CTD,name:Kuga}]` for Kuga
2012-2020. The UI rendered three indistinguishable "Kuga" pills with no way
for the user to tell them apart. Same on Galaxy ("Galaxy"/"Galaxy"), every
multi-catCode family.
Fix: detect duplicate baseNames per family and graft a disambiguator —
year first (friendliest), catCode as a last resort. Result:
"Kuga (2013-2016)" / "Kuga (2016-2020)" / "Kuga (CTD)" — or, when year is
present even for unique entries, always include it for a uniform look.
2. **Section title was lying.** UI label was `catalog.fordVariant.modelYear`
= "Model Yılı" ("Model Year") but for Ford LEGACY these are catCodes
(generation identifiers), not years. Rename the key value to "Varyant" /
"Variant" — semantically correct for both Ford catCodes and Volvo years
(Volvo flows through the same selector and its codes ARE years; "Varyant"
covers both).
Cleared the affected Redis cache (`pl24:ford:config:*`) on dev so the next
hit fetches fresh disambiguated data; prod cache will roll over on its own
TTL after promote.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,7 @@
|
||||
"fordVariant": {
|
||||
"title": "Select Model",
|
||||
"subtitle": "Optional — use Show All to browse all variants",
|
||||
"modelYear": "Model Year",
|
||||
"modelYear": "Variant",
|
||||
"engine": "Engine",
|
||||
"gearbox": "Gearbox",
|
||||
"showAll": "Show All",
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
"fordVariant": {
|
||||
"title": "Model Seçin",
|
||||
"subtitle": "İsteğe bağlı — tüm varyantlar için Tümü seçeneğini kullanın",
|
||||
"modelYear": "Model Yılı",
|
||||
"modelYear": "Varyant",
|
||||
"engine": "Motor",
|
||||
"gearbox": "Şanzıman",
|
||||
"showAll": "Tümü",
|
||||
|
||||
Reference in New Issue
Block a user