BLOCK 1 — Orders persistence + expiration:
- New GET /api/[slug]/orders loads active orders from PostgreSQL on mount, so the
dashboard survives reloads (SSE only carries live events); it also prunes
completed orders older than the retention window on read (no cron)
- Restaurant.orderRetentionHours (default 24, migration 0007) + editor control in
the Orders tab; settings PATCH accepts it
BLOCK 2 — Smart cart pairings (precomputed, zero tokens at runtime):
- Restaurant.pairings JSON (migration 0008) stores { productId: [productId] }
- Optional 'Generate smart suggestions' checkbox in the publish modal; on publish,
one cheap Haiku call analyzes the snapshot and stores validated complements
(lib/pairings.ts, reuses parseLenientJson). AI failure never breaks publishing
- pairings read live and exposed via the public menu; cart shows an auto-rotating,
swipeable SuggestionCarousel of complements for what's in the cart (excluding
items already added), each with Add — only when orders are on and pairings exist
BLOCK 3 — Brand header:
- Restaurant.bannerImage, profileImage, socialLinks (migration 0009)
- New editor Brand tab: upload banner + circular logo (reuses /upload), social
links with common-platform suggestions and basic URL validation; saved via settings
- Public BrandHeader: full-bleed banner (edge-to-edge behind the island, safe-area
aware), circular logo avatar, name, and clickable social icons (lucide-react).
Graceful fallbacks (palette gradient banner, initial avatar) — no broken images.
Images are language-independent
All read live (no republish needed). i18n es/en at parity; glassmorphism,
mobile-first and safe areas preserved. Adds lucide-react.
Verified: build passes; 9 migrations apply; orders persist + prune on read;
publish survives missing API key; pairings + brand exposed via /menu.
206 lines
6.9 KiB
JSON
206 lines
6.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",
|
|
"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",
|
|
"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",
|
|
"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"
|
|
}
|
|
}
|