Files
kaiser-natron/dist/assets/SearchSection-C1TOhMKH.js
Dorian 0c9a0ccd95 bundles: locale-aware copy via i18n keys
Bundle data was carrying localized strings (name, usage, items,
description, imageAlt, badge) directly, so EN visitors saw German
copy on the bundle page and home grid. Strings are now keyed under
bundle.<id>.<field> in the i18n catalogue (DE + EN); src/api/bundles.js
keeps only structural data + i18n key references.

HomePage builds a localizedBundles computed that resolves the keys
through t() before passing to the Bundles design-system component,
so the existing component stays agnostic of i18n. BundlePage exposes
a `bundleCopy` computed for the same reason, and resolvedItems now
maps over `itemKeys` instead of static labels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 11:02:46 +01:00

11 lines
2.5 KiB
JavaScript

import{B as e,C as t,G as n,T as r,c as i,ft as a,j as o,m as s,p as c,r as l,s as u,u as d}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{t as f}from"./Icon-BCo6-bGH.js";import{t as p}from"./i18n-XDSWEyNo.js";import{t as m}from"./Search-tVfC5YRi.js";import{a as h,r as g}from"./products-BqW5PUnm.js";import{t as _}from"./Button-D1Rp2Xe1.js";import{t as v}from"./SectionShell-CyPmh1h8.js";var y={class:`eyebrow mb-5`},b={class:`rounded-md border border-line bg-paper p-6 flex flex-col sm:flex-row sm:items-center gap-4`},x={class:`text-[13px] text-muted`},S={class:`eyebrow mb-5`},C={class:`rounded-md border border-line bg-paper divide-y divide-line overflow-hidden`},w=[`src`,`alt`],T={class:`min-w-0 flex-1`},E={class:`text-[14px] font-semibold text-ink truncate`},D={class:`text-[12px] text-muted truncate`},O={class:`shrink-0 text-[13px] font-semibold text-brand`},k={class:`eyebrow mb-5`},A=`natron pulver`,j={__name:`SearchSection`,setup(j){let{t:M}=p(),N=e(!1),P=h(A,g,4);return(e,p)=>(t(),i(v,{eyebrow:n(M)(`ds.eyebrow.components`),title:n(M)(`ds.search.title`),description:n(M)(`ds.search.description`)},{default:o(()=>[u(`section`,null,[u(`h2`,y,a(n(M)(`ds.heading.default`)),1),u(`div`,b,[s(_,{variant:`primary`,onClick:p[0]||=e=>N.value=!0},{before:o(()=>[s(f,{name:`search`,size:18})]),default:o(()=>[c(` `+a(n(M)(`ds.search.demo.label`)),1)]),_:1}),u(`p`,x,a(n(M)(`ds.search.demo.hint`)),1)])]),u(`section`,null,[u(`h2`,S,a(n(M)(`ds.heading.variants`))+` — "`+a(A)+`"`,1),u(`ul`,C,[(t(!0),d(l,null,r(n(P),e=>(t(),d(`li`,{key:e.id,class:`flex items-center gap-4 px-4 py-3`},[u(`img`,{src:e.image,alt:e.title,loading:`lazy`,decoding:`async`,class:`shrink-0 w-12 h-12 rounded-sm object-cover bg-cream`},null,8,w),u(`div`,T,[u(`p`,E,a(e.title),1),u(`p`,D,a(e.size)+` · `+a(e.category),1)]),u(`span`,O,``+a(e.price.toFixed(2).replace(`.`,`,`)),1)]))),128))])]),u(`section`,null,[u(`h2`,k,a(n(M)(`ds.heading.usage`)),1),p[2]||=u(`div`,{class:`rounded-md border border-line bg-paper p-6 font-mono text-[12px] text-ink`},[u(`pre`,{class:`whitespace-pre-wrap`},`import { products } from '@/api/products.js'
import Search from '@/design-system/components/Search.vue'
const open = ref(false)
<Search v-model:open="open" :products="products" />
// Navbar already renders its own Search overlay, so most callers
// just pass the catalogue in:
<Navbar :products="products" />`)],-1)]),s(m,{open:N.value,"onUpdate:open":p[1]||=e=>N.value=e,products:n(g)},null,8,[`open`,`products`])]),_:1},8,[`eyebrow`,`title`,`description`]))}};export{j as default};