Built on the existing Order/SSE system (no parallel system). Model choice: each
Order is one subaccount; a table account is the set of active orders sharing a
tableNumber with split=true. This reuses table grouping, the SSE events, GET
/orders, retention pruning, and the dashboard with minimal change.
Model (migration 0010): Order.split/subaccountName/paid, Restaurant.splitEnabled,
OrderItem.addedAt (for intermediate-item timing).
Endpoints (public): GET table-status (none/normal/split), POST split/join
(creates/joins; converts a normal table to split non-destructively — existing
orders flagged split=true as an unnamed 'table' subaccount, items kept; name
collisions get a numeric suffix), POST split/sync (diner updates own subaccount),
GET split/summary (table total + count, NO per-subaccount item detail). Editor
PATCH /orders/[id] gains a paid toggle; settings gains splitEnabled.
Public UI: Split FAB (only when splitEnabled && orders on), join/convert modal,
diner subaccount view (own items + own subtotal + table total only), and detection
in the normal cart that offers to join when the table is already split.
Admin (OrdersTab): split tables grouped and broken down by subaccount (name, items,
subtotal, paid badge/toggle) + table total + complete-table; live via SSE.
Block 7 — modification notice + dual timer: order-edit highlights the card as
'Modificada' (ring + badge, dismiss on click; self-edits suppressed); the main
table timer keeps running from createdAt (never reset on edit) and drives the
green→amber→red color, while intermediate items show 'added X ago' from addedAt.
i18n es/en at parity. Glassmorphism, mobile-first, safe areas preserved.
Verified end-to-end (migration 0010 applies; build passes; all i18n present):
1 split button hidden when splitEnabled off (🧾 count 0→1);
2 join+sync creates Ana subaccount w/ 2 items;
3 table-status reports split for table 5;
4 Beto joins → 2 subaccounts, summary exposes total+count only (no item detail);
5 dashboard breakdown Ana $200 / Beto $50 / total $250, mark paid persists + SSE order-edit fires;
6 normal table 3 converts to split keeping its items (becomes '(table)' subaccount + new named one);
7 adding an item 10 min later keeps createdAt (main timer ~10m) and stamps the new item's addedAt recent.
233 lines
7.9 KiB
JSON
233 lines
7.9 KiB
JSON
{
|
|
"common": {
|
|
"appName": "Smart menu",
|
|
"save": "Save",
|
|
"cancel": "Cancel",
|
|
"delete": "Delete",
|
|
"edit": "Edit",
|
|
"add": "Add",
|
|
"close": "Close",
|
|
"loading": "Loading…",
|
|
"back": "Back",
|
|
"confirm": "Confirm",
|
|
"restore": "Restore",
|
|
"language": "Language"
|
|
},
|
|
"menu": {
|
|
"askAi": "Ask the AI",
|
|
"actions": "Actions",
|
|
"placeOrder": "Place order",
|
|
"callWaiter": "Call the waiter",
|
|
"viewFull": "View full menu",
|
|
"tableNumber": "Table number",
|
|
"table": "Table",
|
|
"send": "Send",
|
|
"addToOrder": "Add",
|
|
"cart": "Cart",
|
|
"cartEmpty": "Your cart is empty.",
|
|
"itemNotePlaceholder": "Note (e.g. no onion)",
|
|
"generalNotePlaceholder": "General order note (optional)",
|
|
"total": "Total",
|
|
"confirmOrder": "Confirm order",
|
|
"suggestions": "You might also like",
|
|
"split": "Split bill",
|
|
"myAccount": "My account",
|
|
"yourName": "Your name",
|
|
"createSplit": "Create split bill",
|
|
"joinSplit": "Join table {table}'s bill",
|
|
"splitDetected": "Table {table} already has a split bill",
|
|
"yourSubaccount": "Your subaccount",
|
|
"yourSubtotal": "What you owe",
|
|
"tableTotal": "Table total",
|
|
"updateSubaccount": "Update my subaccount",
|
|
"addDishes": "Add dishes",
|
|
"subaccountUpdated": "Your subaccount was updated",
|
|
"splitItemsEmpty": "Add dishes to your subaccount.",
|
|
"yourOrder": "Your order",
|
|
"empty": "No dishes in this section yet.",
|
|
"waiterCalled": "The waiter is on the way",
|
|
"orderSent": "Your order was sent",
|
|
"macroLegend": "Macro color code",
|
|
"tapToFlip": "Tap to see macros",
|
|
"viewCards": "Cards",
|
|
"viewList": "List"
|
|
},
|
|
"macros": {
|
|
"protein": "Protein",
|
|
"carbs": "Carbs",
|
|
"sugar": "Sugars",
|
|
"fat": "Fats",
|
|
"fiber": "Fiber",
|
|
"kcal": "Calories"
|
|
},
|
|
"ai": {
|
|
"title": "Menu consultant",
|
|
"placeholder": "What do you recommend if I'm diabetic?",
|
|
"thinking": "Thinking…",
|
|
"intro": "Tell me what you're after and I'll recommend dishes from the menu.",
|
|
"pairWith": "To pair with"
|
|
},
|
|
"editor": {
|
|
"save": "Save",
|
|
"edit": "Edit",
|
|
"delete": "Delete",
|
|
"catalog": "Catalog",
|
|
"palette": "Palette",
|
|
"brand": "Brand",
|
|
"orders": "Orders",
|
|
"qr": "QR",
|
|
"publishedVersion": "Published version",
|
|
"noVersion": "You haven't published a version yet",
|
|
"addDish": "Add dish",
|
|
"newSection": "New section",
|
|
"viewMenu": "View menu",
|
|
"saveAndPublish": "Save and publish",
|
|
"versionNamePlaceholder": "Updated menu June 2026",
|
|
"versionNameLabel": "Version name",
|
|
"publishSuccess": "Done! Your menu «{name}» is now live",
|
|
"history": "Version history",
|
|
"historyHint": "You can see your last 5 versions",
|
|
"translateAi": "Translate with AI",
|
|
"autoTranslation": "Auto translation",
|
|
"reviewedTranslation": "Reviewed",
|
|
"complete": "Complete",
|
|
"missingInfo": "Missing info",
|
|
"active": "Active",
|
|
"inactive": "Inactive",
|
|
"name": "Name",
|
|
"description": "Description",
|
|
"price": "Price",
|
|
"section": "Section",
|
|
"allergens": "Allergens",
|
|
"dietTags": "Diet tags",
|
|
"media": "Photos and videos",
|
|
"uploadMedia": "Upload photo or video",
|
|
"ordersDisabled": "Order taking is disabled",
|
|
"enableOrders": "Enable order taking",
|
|
"enableSplit": "Enable split bill",
|
|
"enableSplitHint": "Diners build a shared per-table account with a subaccount each.",
|
|
"split": "Split",
|
|
"tableTotal": "Table total",
|
|
"completeTable": "Complete table",
|
|
"tableSubaccount": "Table",
|
|
"subaccountEmpty": "No dishes yet.",
|
|
"paid": "Paid",
|
|
"markPaid": "Mark paid",
|
|
"markUnpaid": "Mark unpaid",
|
|
"modified": "Modified",
|
|
"addedNow": "just now",
|
|
"addedAgo": "added {time} ago",
|
|
"orderRetention": "Keep completed orders for",
|
|
"orderRetentionHint": "Older completed orders are removed automatically.",
|
|
"hours": "hours",
|
|
"generateSuggestions": "Generate smart cart suggestions",
|
|
"generateSuggestionsHint": "AI analyzes the menu on publish and precomputes pairings (just once).",
|
|
"completeOrder": "Complete order",
|
|
"itemNote": "Dish note",
|
|
"generalNote": "General note",
|
|
"searchDish": "Search a dish to add…",
|
|
"total": "Total",
|
|
"table": "Table",
|
|
"downloadQr": "Download QR",
|
|
"publicLink": "Public link",
|
|
"copyLink": "Copy link",
|
|
"copied": "Copied",
|
|
"paletteHint": "This does not affect the macro color code",
|
|
"showMacros": "Show macros on the menu",
|
|
"showMacrosHint": "Each section can hide its macros individually.",
|
|
"showMacrosDisclaimer": "Macros will stop showing to the public, but they are not deleted.",
|
|
"sectionMacros": "Macros in this section"
|
|
},
|
|
"brand": {
|
|
"banner": "Banner image",
|
|
"bannerEmpty": "No banner",
|
|
"uploadBanner": "Upload banner",
|
|
"logo": "Logo / profile photo",
|
|
"uploadLogo": "Upload logo",
|
|
"social": "Social links",
|
|
"platform": "Platform",
|
|
"addLink": "Add link"
|
|
},
|
|
"qr": {
|
|
"templates": "Templates",
|
|
"customize": "Customize",
|
|
"dotsColor": "Dots color",
|
|
"cornersColor": "Corners color",
|
|
"background": "Background",
|
|
"transparent": "Transparent",
|
|
"dotShape": "Dot shape",
|
|
"cornerShape": "Corner shape",
|
|
"gradient": "Gradient",
|
|
"logo": "Center logo",
|
|
"uploadLogo": "Upload logo",
|
|
"logoHint": "The logo takes up at most 20% of the code so it doesn't hurt scanning.",
|
|
"errorLevel": "Error correction",
|
|
"lowContrast": "Contrast between dots and background is low; the QR may not scan well. Use higher-contrast colors.",
|
|
"verifyScan": "Check that your QR scans well before printing.",
|
|
"shapes": {
|
|
"square": "Square",
|
|
"rounded": "Rounded",
|
|
"dots": "Dots",
|
|
"classy": "Classy",
|
|
"classy-rounded": "Classy rounded",
|
|
"extra-rounded": "Extra rounded"
|
|
},
|
|
"corners": {
|
|
"square": "Square",
|
|
"dot": "Dot",
|
|
"extra-rounded": "Rounded"
|
|
}
|
|
},
|
|
"import": {
|
|
"title": "Load menu",
|
|
"loadMenu": "Load menu",
|
|
"method": {
|
|
"file": "File",
|
|
"link": "Link",
|
|
"text": "Text"
|
|
},
|
|
"filePrompt": "Tap to choose a file",
|
|
"fileHint": "PDF, photo of the menu, Excel or CSV",
|
|
"textPrompt": "Paste your menu text here…",
|
|
"disclaimer": "Estimates (especially allergens) are AI-generated and must be verified before publishing. Smart Menu is not responsible for unverified data.",
|
|
"extract": "Extract menu",
|
|
"extracting": "Reading your menu with AI…",
|
|
"reviewSummary": "We found {sections} sections and {products} dishes. Review them before applying.",
|
|
"estimatedBadge": "Estimated by AI — verify",
|
|
"modeAdd": "Add to my current menu",
|
|
"modeReplace": "Replace my current menu",
|
|
"replaceWarning": "This will delete your current draft sections and dishes.",
|
|
"apply": "Apply to draft",
|
|
"errors": {
|
|
"import_failed": "We couldn't read that menu. Try another file or paste the text.",
|
|
"nothing_found": "We didn't find any dishes in what you sent.",
|
|
"invalid_link": "That link isn't valid.",
|
|
"fetch_failed": "We couldn't open that link.",
|
|
"empty_text": "Paste some text first.",
|
|
"no_file": "Choose a file first.",
|
|
"file_too_large": "The file is too large (max {mb} MB). Compress it or use the text or link method.",
|
|
"parse_failed": "We couldn't read the menu cleanly. Try less text or load it by sections.",
|
|
"output_truncated": "The menu is very long and got cut off. Load it in parts (e.g. one section at a time)."
|
|
}
|
|
},
|
|
"auth": {
|
|
"login": "Log in",
|
|
"username": "Username",
|
|
"password": "Password",
|
|
"invalid": "Wrong username or password",
|
|
"invalidLink": "Invalid access link"
|
|
},
|
|
"admin": {
|
|
"title": "Collina master panel",
|
|
"newRestaurant": "New restaurant",
|
|
"restaurants": "Restaurants",
|
|
"name": "Name",
|
|
"slug": "Slug",
|
|
"create": "Create restaurant",
|
|
"editorLink": "Editor link",
|
|
"publicLink": "Public link",
|
|
"credentials": "Initial credentials",
|
|
"active": "Active"
|
|
}
|
|
}
|