feat(pcat): translate part descriptions + vehicle attributes #36

Merged
root merged 2 commits from dev into main 2026-05-19 11:32:54 +03:00
Owner

Two follow-ups to the EMEX translation work, focused on PCAT parity.

Changes

  • PCAT part description (notice) translation — was stored raw English alongside translated name. Now batched into translateMany so users see Turkish notices.
  • Vehicle body/engine/transmission attrs — were raw upstream values from VIN decode. Wire up the existing emex.mapper dictionaries on PCAT single-car, PCAT resolveById, and EMEX single-vehicle result paths. translateToTurkish now falls back to the original term on dictionary miss (upstream values are heterogeneous; losing them was worse than leaving them untranslated).
  • Worker backfill for parts.description — worker was updating parts.name after LLM translation but not description, so PCAT notices stayed raw forever once cached.

Verification (dev.sase.tr)

Fresh decode of VIN NM0WXXTACWLC21758 (Ford Transit):

  • bodyType: "Van" → "Minivan" (dictionary hit)
  • engine/transmission: heterogeneous strings — kept raw, expected.
  • Description LLM translation not testable on dev (OPENROUTER_API_KEY not set), but backfill UPDATE SQL verified manually.
Two follow-ups to the EMEX translation work, focused on PCAT parity. ## Changes - **PCAT part `description` (notice) translation** — was stored raw English alongside translated `name`. Now batched into translateMany so users see Turkish notices. - **Vehicle body/engine/transmission attrs** — were raw upstream values from VIN decode. Wire up the existing emex.mapper dictionaries on PCAT single-car, PCAT resolveById, and EMEX single-vehicle result paths. `translateToTurkish` now falls back to the original term on dictionary miss (upstream values are heterogeneous; losing them was worse than leaving them untranslated). - **Worker backfill for `parts.description`** — worker was updating `parts.name` after LLM translation but not `description`, so PCAT notices stayed raw forever once cached. ## Verification (dev.sase.tr) Fresh decode of VIN `NM0WXXTACWLC21758` (Ford Transit): - `bodyType`: "Van" → "Minivan" ✅ (dictionary hit) - `engine`/`transmission`: heterogeneous strings — kept raw, expected. - Description LLM translation not testable on dev (`OPENROUTER_API_KEY` not set), but backfill UPDATE SQL verified manually.
root added 2 commits 2026-05-19 11:32:47 +03:00
PCAT was missing parity with EMEX in two places:
- Part `description` (notice) was stored raw English alongside translated `name`.
  Now batched into translateMany so users see Turkish notices.
- Vehicle body/engine/transmission attrs from VIN decode were raw upstream
  values. Wire up the existing emex.mapper dictionaries on the PCAT
  single-car, PCAT resolveById, and EMEX single-vehicle result paths.
- emex.mapper translateToTurkish now falls back to the original term on
  dictionary miss instead of null — upstream values are heterogeneous
  (engine codes, multi-word descriptors); losing them was worse than
  leaving them untranslated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(translation): backfill parts.description after async LLM translation
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
39ad0d4c2a
Worker was updating parts.name but not parts.description, so PCAT part
notices stayed raw English forever once cached. Match on raw value still
being present — once translated, the row no longer matches and we stop
touching it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
root merged commit b53600bf9b into main 2026-05-19 11:32:54 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#36