On a failed fetch the store now keeps the last real payload (stale > fake) and flags `disconnected` instead of overwriting live data with bundled demo data. Sample fallback is gated behind import.meta.env.DEV, so `vite build` tree-shakes it out entirely (verified: no sample strings in dist). - cold start / no data: centered reconnect spinner that keeps retrying - data present + drop: stale data stays, header shows amber "reconnecting" - polling retries faster (4s) while disconnected, recovers automatically - sample.ts data moved into sampleOverview() so the module fully tree-shakes Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
83 lines
2.0 KiB
TypeScript
83 lines
2.0 KiB
TypeScript
// English mirrors de.ts exactly (same key shape) — de is the canonical schema.
|
||
export default {
|
||
app: {
|
||
brand: 'PressV',
|
||
plant: 'Plant',
|
||
line: 'Temperprozess',
|
||
subtitle: 'Live Overview',
|
||
live: 'Live',
|
||
demo: 'Sample data',
|
||
},
|
||
conn: {
|
||
connecting: 'Connecting to server …',
|
||
lost: 'Connection lost – retrying …',
|
||
reconnecting: 'Reconnecting …',
|
||
},
|
||
flow: {
|
||
presses: 'Presses',
|
||
pressesSub: 'incl. not yet loaded',
|
||
loaded: 'Loaded onto cart',
|
||
onWay: 'On the way',
|
||
oven: 'Oven',
|
||
finished: 'Finished',
|
||
orders: 'Orders',
|
||
ordersMax: 'up to 4 / cart',
|
||
},
|
||
kpi: {
|
||
notVerladen: 'Not loaded · on line',
|
||
notVerladenSub: 'Parts still at the press',
|
||
onWay: 'On the way',
|
||
onWaySub: '{n} carts in transit',
|
||
oven: 'In oven',
|
||
ovenSub: '{n} batches',
|
||
finished: 'Finished',
|
||
finishedSub: '{n} carts tempered',
|
||
scrapRate: 'Scrap rate',
|
||
scrapRateSub: 'Scrap / total',
|
||
},
|
||
line: {
|
||
header: 'Machine hall',
|
||
active: '{running}/{total} active · carts hang under their press',
|
||
toStorage: 'Out of the oven',
|
||
toStorageTail: 'finished / storage',
|
||
},
|
||
press: {
|
||
good: 'Good',
|
||
notVerladen: 'not loaded',
|
||
free: 'free',
|
||
statusRun: 'Running',
|
||
statusStop: 'Fault',
|
||
statusIdle: 'Idle',
|
||
orderCount: '{n} active orders',
|
||
},
|
||
lane: {
|
||
wagen: '{n} carts ↓',
|
||
none: '—',
|
||
parts: '{n} parts',
|
||
ovenIn: 'oven in {n} min',
|
||
},
|
||
oven: {
|
||
title: 'Temper oven',
|
||
meta: '{parts} parts · {batches} batches · avg {avg} min',
|
||
nextOut: 'next out',
|
||
progress: '{done}/{total} min tempered',
|
||
unit: 'min',
|
||
},
|
||
finished: {
|
||
title: 'Finished · tempered',
|
||
range: 'Window · {label}',
|
||
goodParts: 'Good parts',
|
||
carts: 'Carts',
|
||
scrap: 'Scrap',
|
||
avgOven: 'Avg oven time',
|
||
},
|
||
range: {
|
||
label: 'Finished · window',
|
||
'12h': 'last 12 h',
|
||
'1d': 'last day',
|
||
'7d': 'last 7 days',
|
||
'14d': 'last 14 days',
|
||
'30d': 'last 30 days',
|
||
},
|
||
}
|