Files
smartmenu-collina/messages/en.json
T
Jorem Juárez 9fad1d43aa Harden menu import: tolerate truncated JSON + reject oversized files
Bug 1 (malformed/truncated JSON crashed the route with SyntaxError):
- Raise extraction max_tokens 4000 -> 8000 and ask the model for compact, complete JSON
- Parse tolerantly: extractJson() for fences/prose, plus a repair pass that closes
  open strings/brackets and drops a trailing partial entry for token-truncated output
- Wrap JSON.parse; on failure return a friendly code (parse_failed, or output_truncated
  when stop_reason was max_tokens) instead of a raw 500

Bug 2 (40MB PDF -> Anthropic 413):
- Validate visual file size BEFORE calling the API (max 4.5MB raw; base64 inflates ~33%)
- Return 413 {error:file_too_large, maxMb} so the UI shows 'max X MB, compress or use text/link'

i18n: file_too_large (with {mb}), parse_failed, output_truncated (es/en); ImportModal
interpolates the size limit.

Verified: build passes; repair recovers mid-string/mid-property/fenced/prose JSON;
oversized upload returns 413 with the limit; text path fails gracefully (no crash).
2026-06-14 02:14:40 -06:00

172 lines
5.6 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": {
"save": "Save",
"edit": "Edit",
"delete": "Delete",
"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"
},
"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"
}
}