feat(menu): the menu in English and Greek (platform-v2 step 6.4, D-29)
- products.translations / categories.translations (Alembic 0033, core/menu_languages.py: el + en,
name / description / quick options by their base name; catalog.translation). Empty = the text
as typed; no machine translation (owner).
- In the manager's product editor ("In English" / "In Greek", quick extras), the category dialog,
and a menu board's Language (signage MenuContent.language).
- Customer screens only: cloud snapshot names / descriptions per language (C-2), the menu tablet's
EL / EN switch the names (localize), signage boards; tickets, KDS, counter, phones keep the base.
- Catalogue bundles carry translations; @xenia/access menuLanguages.js (a backend test compares).
- e2e: manager (the other language saved), menu tablet (EN / EL names), QR table (English on
the menu, the base name on the kitchen's order, Greek page as typed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// the draft (PlaylistEditor asks for it as you change things).
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { ArrowDown, ArrowUp, EyeOff, X } from 'lucide-react'
|
||||
import { SALES_POINTS } from '@xenia/access'
|
||||
import { MENU_LANGUAGES, SALES_POINTS } from '@xenia/access'
|
||||
import { useFormat, useTranslation } from '@xenia/i18n'
|
||||
import { Field, IconButton, Input, Select, Switch } from '@xenia/ui'
|
||||
import client from '../../api/client'
|
||||
@@ -155,6 +155,10 @@ export default function MenuEditor({ slide, onChange, media, onMedia, misfit = [
|
||||
<Select value={c.sales_point ?? ''} onChange={e => setC({ sales_point: e.target.value || null })} data-testid="signage-menu-prices"
|
||||
options={[{ value: '', label: t('signage.menu.noPrices') }, ...SALES_POINTS.map(sp => ({ value: sp, label: t(`common:salesPoints.${sp}.name`) }))]} />
|
||||
</Field>
|
||||
<Field label={t('signage.menu.language')} hint={t('signage.menu.languageHint')}>
|
||||
<Select value={c.language ?? ''} onChange={e => setC({ language: e.target.value || null })} data-testid="signage-menu-language"
|
||||
options={[{ value: '', label: t('signage.menu.asTyped') }, ...MENU_LANGUAGES.map(l => ({ value: l, label: t(`products.editor.lang.${l}`) }))]} />
|
||||
</Field>
|
||||
<Field label={t('signage.menu.soldOut')}>
|
||||
<Select value={c.sold_out || 'strike'} onChange={e => setC({ sold_out: e.target.value })}
|
||||
options={[{ value: 'strike', label: t('signage.menu.strike') }, { value: 'hide', label: t('signage.menu.hideSoldOut') }]} />
|
||||
|
||||
Reference in New Issue
Block a user