fix: localize the primary data-quality evidence summary (live-caught on Unraid)
Live validation on the deployed fix branch caught a real bug: every data-quality issue's top-of-page "Evidence summary" line rendered the raw, always-English legacy evidence.summary string unconditionally -- in all three languages -- even though the backend has been emitting structured, localizable evidence.signals for a while (app/services/data_quality.py already documented this exact intent). The frontend side of that conversion was never finished. - DataQualityIssueDetail.tsx now renders evidence.signals through the operator's locale as the primary summary; the raw evidence.summary string is only visible inside "Technical details" (via the existing EvidenceDisclosure JSON dump). - The four DQ-DEMO-* seed rows that anchor the guided demo's scripted scenarios now carry real, accurate signals computed at seed time (duplicate-customer's similarity score is the actual SequenceMatcher ratio on the seeded names, not invented) instead of only a legacy English sentence. - Rows with no structured signals (generic filler seed data) fall back to the raw text rather than showing a blank summary; the one known placeholder string gets its own localized rendering so it never displays as English filler either. - New regression test: the vehicle_status_conflict evidence summary must show localized text and must never contain the specific raw English sentence that was live-visible before this fix, in all 3 languages. 151 backend tests, Ruff, mypy green; full local Playwright suite green (a couple of sequential-run-only flakes, both confirmed to pass in isolation and unrelated to this change). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
cda2c32bd0
commit
2e4fb43f09
@@ -101,6 +101,17 @@
|
||||
"whyItMatters": "An incorrect status can make an unavailable vehicle appear bookable, or keep an available vehicle hidden from the fleet."
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"duplicate.exact_email": "Identical email address",
|
||||
"duplicate.exact_phone": "Identical phone number",
|
||||
"duplicate.same_postal_code": "Same postal code",
|
||||
"duplicateSimilarName": "Strongly similar name (score {{score}})",
|
||||
"missingField": "Missing field: {{field}}",
|
||||
"overlapReservedBookings": "Overlapping bookings: {{refs}}",
|
||||
"odometerRegression": "Booking {{laterRef}} recorded {{laterKm}} km, below the {{earlierKm}} km recorded by earlier booking {{earlierRef}}.",
|
||||
"upcomingBookingMissingInspection": "Booking {{bookingRef}} starts soon but the required operational inspection is still missing.",
|
||||
"seedPlaceholder": "Synthetic seed data with no further detail."
|
||||
},
|
||||
"duplicateCustomer": {
|
||||
"heading": "Compare and merge",
|
||||
"description": "Choose the canonical customer and review each conflicting field.",
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
"whyItMatters": "Un statut incorrect peut faire apparaître un véhicule indisponible comme réservable, ou masquer un véhicule disponible de la flotte."
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"duplicate.exact_email": "Adresse e-mail identique",
|
||||
"duplicate.exact_phone": "Numéro de téléphone identique",
|
||||
"duplicate.same_postal_code": "Même code postal",
|
||||
"duplicateSimilarName": "Nom fortement similaire (score {{score}})",
|
||||
"missingField": "Champ manquant : {{field}}",
|
||||
"overlapReservedBookings": "Réservations qui se chevauchent : {{refs}}",
|
||||
"odometerRegression": "La réservation {{laterRef}} a enregistré {{laterKm}} km, en dessous des {{earlierKm}} km enregistrés par la réservation antérieure {{earlierRef}}.",
|
||||
"upcomingBookingMissingInspection": "La réservation {{bookingRef}} commence bientôt mais l'inspection opérationnelle requise est encore manquante.",
|
||||
"seedPlaceholder": "Donnée de démonstration synthétique sans autre détail."
|
||||
},
|
||||
"duplicateCustomer": {
|
||||
"heading": "Comparer et fusionner",
|
||||
"description": "Choisissez le client de référence et examinez chaque champ divergent.",
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
"whyItMatters": "Een foutieve status kan een niet-beschikbaar voertuig boekbaar laten lijken, of een beschikbaar voertuig verbergen voor het wagenpark."
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"duplicate.exact_email": "Identiek e-mailadres",
|
||||
"duplicate.exact_phone": "Identiek telefoonnummer",
|
||||
"duplicate.same_postal_code": "Dezelfde postcode",
|
||||
"duplicateSimilarName": "Sterk gelijkende naam (score {{score}})",
|
||||
"missingField": "Ontbrekend veld: {{field}}",
|
||||
"overlapReservedBookings": "Overlappende reserveringen: {{refs}}",
|
||||
"odometerRegression": "Boeking {{laterRef}} registreerde {{laterKm}} km, lager dan de {{earlierKm}} km van eerdere boeking {{earlierRef}}.",
|
||||
"upcomingBookingMissingInspection": "Boeking {{bookingRef}} start binnenkort maar de vereiste operationele inspectie ontbreekt nog.",
|
||||
"seedPlaceholder": "Synthetisch demogegeven zonder verder detail."
|
||||
},
|
||||
"duplicateCustomer": {
|
||||
"heading": "Vergelijken en samenvoegen",
|
||||
"description": "Kies de klant die behouden blijft en bekijk elk afwijkend veld.",
|
||||
|
||||
Reference in New Issue
Block a user