ui(carwash): mapping chips show the camera's canonical class ids, not translations
The vocabulary is a code constant (the model's contract), the site only maps it; a chip reading VETURË beside a site category named Veture blurred exactly that (user, 2026-09-06). Translation stays as the tooltip; a hint names where the list lives. Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
This commit is contained in:
@@ -32,7 +32,9 @@ function ListEditor({
|
||||
onChange: (items: Item[]) => void;
|
||||
addLabel: string;
|
||||
/** Categories only: offer the vision vocabulary as chips under each row — the site's
|
||||
* own "car, sedan → Vetura" mapping (venue-modules.md §Vehicle category). */
|
||||
* own "car, sedan → Vetura" mapping (venue-modules.md §Vehicle category). The chips
|
||||
* show the CANONICAL ids (the model's fixed vocabulary, a code constant), never a
|
||||
* translation, so they read as what they are: not site text (user, 2026-09-06). */
|
||||
visionMap?: boolean;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
@@ -71,12 +73,18 @@ function ListEditor({
|
||||
</div>
|
||||
{visionMap && (
|
||||
<div className="flex flex-wrap items-center gap-1 pl-1">
|
||||
<span className="mr-1 text-[0.625rem] uppercase tracking-wider text-term-muted">{t("wash.visionClasses")}</span>
|
||||
<span className="mr-1 text-[0.625rem] uppercase tracking-wider text-term-muted" title={t("wash.visionClassesHint")}>{t("wash.visionClasses")}</span>
|
||||
{VEHICLE_CLASSES.map((cls) => {
|
||||
const on = (it.visionClasses ?? []).includes(cls);
|
||||
return (
|
||||
<button key={cls} type="button" className={`btn btn-sm ${on ? "btn-primary" : "btn-ghost"}`} onClick={() => toggleClass(i, cls)}>
|
||||
{t(`vehicleClass.${cls}`)}
|
||||
<button
|
||||
key={cls}
|
||||
type="button"
|
||||
className={`btn btn-sm font-mono lowercase ${on ? "btn-primary" : "btn-ghost"}`}
|
||||
title={t(`vehicleClass.${cls}`)}
|
||||
onClick={() => toggleClass(i, cls)}
|
||||
>
|
||||
{cls}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user