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:
@@ -8,7 +8,8 @@
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
"./salesPoints": "./src/salesPoints.js",
|
||||
"./allergens": "./src/allergens.js"
|
||||
"./allergens": "./src/allergens.js",
|
||||
"./menuLanguages": "./src/menuLanguages.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@xenia/api": "^0.0.0",
|
||||
|
||||
@@ -20,3 +20,4 @@ export { OverrideHost } from './OverrideHost.jsx'
|
||||
export { SALES_POINTS, IN_PERSON, DIGITAL, normalizeSalesPoints } from './salesPoints.js'
|
||||
export { ALLERGENS, ALLERGEN_LEVELS, allergenList, nextAllergenLevel, setAllergen } from './allergens.js'
|
||||
export { Allergens } from './Allergens.jsx'
|
||||
export { MENU_LANGUAGES, translatedLanguages, inLanguage } from './menuLanguages.js'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// The menu's languages (plan step 6.4, owner 2026-11-18): English and Greek, the same list as the
|
||||
// backend's core/menu_languages.py. A product's own name is its base text; a translation adds
|
||||
// the other language; a missing translation shows the base text.
|
||||
export const MENU_LANGUAGES = ['el', 'en']
|
||||
|
||||
/** The languages a venue translates its menu into: every menu language but its own. */
|
||||
export const translatedLanguages = venueLanguage => MENU_LANGUAGES.filter(l => l !== venueLanguage)
|
||||
|
||||
/** A product's or category's text in a language: `names` / `descriptions` {lang: text} as the
|
||||
* backend resolves them for customer screens, else the base text. */
|
||||
export const inLanguage = (texts, lang, base) => (texts && texts[lang]) || base
|
||||
@@ -116,7 +116,8 @@
|
||||
"too_deep": "Οι κατηγορίες έχουν το πολύ δύο επίπεδα.",
|
||||
"own_parent": "Μια κατηγορία δεν μπορεί να είναι γονέας του εαυτού της.",
|
||||
"group_not_found": "Η ομάδα επιλογών δεν βρέθηκε.",
|
||||
"allergen": "Άγνωστο αλλεργιογόνο ή επίπεδο: {{allergen}}."
|
||||
"allergen": "Άγνωστο αλλεργιογόνο ή επίπεδο: {{allergen}}.",
|
||||
"translation": "Μη αποδεκτή μετάφραση μενού: {{what}}."
|
||||
},
|
||||
"system": {
|
||||
"log_not_found": "Δεν υπάρχει αρχείο καταγραφής για {{date}}."
|
||||
|
||||
@@ -1045,7 +1045,10 @@
|
||||
"perPage": "Προϊόντα ανά σελίδα",
|
||||
"perPageHint": "Κενό: όσα χωράνε στην τηλεόραση. Ένα μεγάλο μενού γυρίζει σελίδες.",
|
||||
"auto": "Όσα χωράνε",
|
||||
"pageSeconds": "Δευτερόλεπτα ανά σελίδα"
|
||||
"pageSeconds": "Δευτερόλεπτα ανά σελίδα",
|
||||
"language": "Γλώσσα",
|
||||
"languageHint": "Τα ονόματα των προϊόντων σε αυτή την οθόνη. Χωρίς μετάφραση: όπως γράφτηκαν.",
|
||||
"asTyped": "Όπως γράφτηκαν"
|
||||
},
|
||||
"badges": {
|
||||
"new": "Νέο",
|
||||
@@ -1801,7 +1804,17 @@
|
||||
"sharedHint": "Εμφανίζεται για όλες εκτός όσων το κρύβουν.",
|
||||
"addShared": "Κοινό υπο-σύνολο",
|
||||
"sharedName": "Όνομα κοινού υπο-συνόλου",
|
||||
"sharedPlaceholder": "π.χ. Είδος ζάχαρης"
|
||||
"sharedPlaceholder": "π.χ. Είδος ζάχαρης",
|
||||
"inLanguage": "Στα {{language}}",
|
||||
"inLanguageShort": "Στα {{language}}",
|
||||
"lang": {
|
||||
"el": "Ελληνικά",
|
||||
"en": "Αγγλικά"
|
||||
},
|
||||
"translationTip": "Τι βλέπουν οι πελάτες σε αυτή τη γλώσσα: QR μενού, online παραγγελίες, tablet μενού και οθόνες. Τα δελτία, οι οθόνες κουζίνας, το ταμείο και τα κινητά των σερβιτόρων κρατούν το όνομα όπως γράφτηκε. Αν μείνει κενό, οι πελάτες βλέπουν το όνομα όπως γράφτηκε.",
|
||||
"trName": "Όνομα",
|
||||
"trNameHint": "Κενό: το όνομα όπως γράφτηκε.",
|
||||
"trDescription": "Περιγραφή"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,8 @@
|
||||
"too_deep": "Categories go at most two levels deep.",
|
||||
"own_parent": "A category can't be its own parent.",
|
||||
"group_not_found": "Option group not found.",
|
||||
"allergen": "Unknown allergen or level: {{allergen}}."
|
||||
"allergen": "Unknown allergen or level: {{allergen}}.",
|
||||
"translation": "The menu can't be translated like that: {{what}}."
|
||||
},
|
||||
"system": {
|
||||
"log_not_found": "There is no log file for {{date}}."
|
||||
|
||||
@@ -1045,7 +1045,10 @@
|
||||
"perPage": "Products per page",
|
||||
"perPageHint": "Empty: as many as fit the TV. A long menu turns its pages.",
|
||||
"auto": "As many as fit",
|
||||
"pageSeconds": "Seconds per page"
|
||||
"pageSeconds": "Seconds per page",
|
||||
"language": "Language",
|
||||
"languageHint": "The products' names on this board. Not translated: as typed.",
|
||||
"asTyped": "As typed"
|
||||
},
|
||||
"badges": {
|
||||
"new": "New",
|
||||
@@ -1801,7 +1804,17 @@
|
||||
"sharedHint": "Offered with every choice except those that hide it.",
|
||||
"addShared": "Shared sub-set",
|
||||
"sharedName": "Name of the shared sub-set",
|
||||
"sharedPlaceholder": "e.g. Kind of sugar"
|
||||
"sharedPlaceholder": "e.g. Kind of sugar",
|
||||
"inLanguage": "In {{language}}",
|
||||
"inLanguageShort": "In {{language}}",
|
||||
"lang": {
|
||||
"el": "Greek",
|
||||
"en": "English"
|
||||
},
|
||||
"translationTip": "What guests see in this language: the QR menu, online ordering, the menu tablets and the screens. Tickets, the kitchen screens, the counter and the waiters' phones keep the name as typed above. Left empty, guests see the name as typed.",
|
||||
"trName": "Name",
|
||||
"trNameHint": "Empty: the name as typed.",
|
||||
"trDescription": "Description"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user