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:
@@ -109,3 +109,13 @@ test('the editor: favourites across lists, choices, groups', () => {
|
||||
assert.equal(body.ingredients[0].group_id, 0) // the group's index in modifier_groups
|
||||
assert.equal(buildBody(removeGroup(f, 7)).ingredients[0].group_id, null)
|
||||
})
|
||||
|
||||
test('the editor keeps the menu in other languages (6.4)', () => {
|
||||
const f = buildForm({ name: 'Σουβλάκι', base_price: 3, quick_options: [{ name: 'Πίτα' }, { name: 'Σάλτσα' }],
|
||||
translations: { en: { name: 'Skewer', quick: { 'Πίτα': 'Pitta' } } } })
|
||||
assert.equal(f.translations.en.name, 'Skewer')
|
||||
assert.equal(f.quick_options[0].tr.en, 'Pitta')
|
||||
const renamed = { ...f, quick_options: [{ ...f.quick_options[0], name: 'Πίτα αραβική' }, f.quick_options[1]] }
|
||||
assert.deepEqual(buildBody(renamed).translations, { en: { name: 'Skewer', quick: { 'Πίτα αραβική': 'Pitta' } } }) // kept by the new base name
|
||||
assert.deepEqual(buildBody({ ...f, translations: { en: { name: ' ', description: '' } }, quick_options: [] }).translations, {})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user