fix(ui): repair Turkish labels + hero preview model name
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled

Two cosmetic fixes the founder flagged in the same browse session:

* parts-panel.tsx — the catalog parts table was missing Turkish
  diacritics on every static label, while the actual part names rendered
  correctly. Looked like an encoding bug; was actually hard-coded ASCII
  strings. Repaired: Parcalar→Parçalar, parca listeleniyor→parça
  listeleniyor, Bu kategori icin parca bulunamadi→Bu kategori için
  parça bulunamadı, Yukleniyor→Yükleniyor, Parca Adi→Parça Adı,
  Geri don→Geri dön. OEM Kodu was already correct.

* index.tsx hero preview — pl24 ships model names with trailing
  duplicates ("Golf 1,6 GOLF"), and the card stitched year right next
  to the engine "(2003 4 silindirli…)" with no clear separator. Now:
  cleanModelName collapses the dup ("Golf 1,6"), year wraps in
  parentheses as a softer secondary element, and the visual flex gap
  guarantees breathing room before the engine pill.
This commit is contained in:
2026-06-02 02:11:35 +03:00
parent 10dcf2d6ae
commit 497aba24ab
2 changed files with 12 additions and 9 deletions

View File

@@ -92,8 +92,8 @@ export function PartsPanel({ parts, vehicleId, categoryId, isLoading }: PartsPan
return (
<div className="flex h-full flex-col overflow-hidden">
<div className="border-b border-border px-4 py-3">
<h3 className="text-sm font-semibold">Parcalar</h3>
<p className="text-xs text-muted-foreground">Yukleniyor...</p>
<h3 className="text-sm font-semibold">Parçalar</h3>
<p className="text-xs text-muted-foreground">Yükleniyor...</p>
</div>
<div className="flex-1 overflow-y-auto">
<div className="space-y-2 p-3">
@@ -109,16 +109,16 @@ export function PartsPanel({ parts, vehicleId, categoryId, isLoading }: PartsPan
return (
<div className="flex h-full flex-col overflow-hidden">
<div className="border-b border-border px-4 py-3">
<h3 className="text-sm font-semibold">Parcalar</h3>
<p className="text-xs text-muted-foreground">{parts.length} parca listeleniyor</p>
<h3 className="text-sm font-semibold">Parçalar</h3>
<p className="text-xs text-muted-foreground">{parts.length} parça listeleniyor</p>
</div>
<div className="flex-1 overflow-y-auto">
{parts.length === 0 ? (
<div className="flex flex-col items-center justify-center gap-4 py-12 text-center text-sm text-muted-foreground">
<p>Bu kategori icin parca bulunamadi.</p>
<p>Bu kategori için parça bulunamadı.</p>
<Button type="button" variant="outline" onClick={() => window.history.back()}>
Geri don
Geri dön
</Button>
</div>
) : (
@@ -126,7 +126,7 @@ export function PartsPanel({ parts, vehicleId, categoryId, isLoading }: PartsPan
<thead className="sticky top-0 z-10 bg-background">
<tr className="border-b border-border text-left text-xs font-medium text-muted-foreground">
<th className="px-3 py-2 w-10">#</th>
<th className="px-3 py-2">Parca Adi</th>
<th className="px-3 py-2">Parça Adı</th>
<th className="px-3 py-2">OEM Kodu</th>
<th className="px-3 py-2 w-14 text-center">Adet</th>
<th className="px-3 py-2">Pozisyon</th>

View File

@@ -3,6 +3,7 @@ import { CarBrandLogo } from "@/components/ui/car-brand-logo";
import { SmartAnimateText } from "@/components/ui/smart-animate-text";
import { VinBrandIcon } from "@/components/ui/vin-brand-icon";
import { KEYS_17, dynamicKeys } from "@/lib/keys";
import { cleanModelName } from "@/lib/vehicle";
import { Button, Input, Separator } from "@sase/ui";
import { Link, createFileRoute, useNavigate } from "@tanstack/react-router";
import {
@@ -997,9 +998,11 @@ export function HomePage() {
<div className="flex flex-wrap items-center gap-3">
<Car className="size-5 text-brand" />
<span className="font-semibold text-foreground">
{vinPreview.make} {vinPreview.model}
{vinPreview.make} {cleanModelName(vinPreview.model) || vinPreview.model}
</span>
<span className="text-sm text-muted-foreground">{vinPreview.year}</span>
{vinPreview.year && vinPreview.year !== "—" && (
<span className="text-sm text-muted-foreground">({vinPreview.year})</span>
)}
{vinPreview.engine !== "—" && (
<span className="rounded-full bg-muted px-2.5 py-0.5 text-xs text-muted-foreground">
{vinPreview.engine}