Import a menu from PDF, photo, Excel/CSV, web link, or pasted text and turn it into draft sections + products with Claude. - Product.aiEstimated JSON flags AI-inferred macros/allergens (migration 0002) - POST /api/[slug]/import: resolves the source (vision via Sonnet for PDF/photo, Haiku for text/CSV/XLSX/web), extracts structured JSON for review only - POST /api/[slug]/import/apply: writes to the draft in add or replace mode, preserving aiEstimated flags; replace wipes the draft first - Editor: 'Cargar menú' button + glass ImportModal (method -> review -> add/replace), 'Estimado por IA — verifica' badges, verification disclaimer; ProductEditor shows the badge and clears the flag when the value is edited - Reuses anthropic.ts, upload/guard, shared extractJson (moved to lib/json.ts) - i18n labels (es/en); adds xlsx dependency for spreadsheet parsing Verified: build passes; migration applies; apply add/replace persist correctly with aiEstimated; extract validation + auth guard behave as expected.
136 lines
4.3 KiB
JSON
136 lines
4.3 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 to order",
|
|
"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"
|
|
},
|
|
"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."
|
|
},
|
|
"editor": {
|
|
"catalog": "Catalog",
|
|
"palette": "Palette",
|
|
"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",
|
|
"completeOrder": "Complete order",
|
|
"table": "Table",
|
|
"downloadQr": "Download QR",
|
|
"publicLink": "Public link",
|
|
"copyLink": "Copy link",
|
|
"copied": "Copied",
|
|
"paletteHint": "This does not affect the macro color code"
|
|
},
|
|
"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."
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|