- Table `media` (Alembic 0026): kind, name, original name, type, sha256
(unique), bytes, width/height, video length, who and when.
- Files under /app/data/media/<sha[:2]>/<sha>/: the original, and for
pictures thumb (200 px) / card (600) / full (1920) WebP, upright from
EXIF, never enlarged, transparency kept. Videos (MP4, WebM) kept as
uploaded; an MP4's length and size come from its header.
- GET/POST /api/media, GET/PATCH/DELETE /api/media/{id} for whoever manages
the menu, customer display, signage or menu tablets. The same file again
returns the existing item. The type comes from the bytes; 20 MB pictures,
200 MB videos, 60 MP; refused uploads leave nothing behind.
- GET /api/media/file/<sha>/<variant>: public (LAN), Cache-Control
public, max-age=1 year, immutable; byte ranges for video; a missing size
is made again from the original.
- register_usage(kind, fn): what uses media (products, displays, signage
from 5.2-5.4) declares it; delete is refused with media.in_use listing
the users.
- tests: test_media.py (12); stack.mjs uploads 3 MB through both nginx hops
and fetches a size with its cache headers (compose stack: all passed).
Backend suite: 490 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
142 lines
7.4 KiB
JSON
142 lines
7.4 KiB
JSON
{
|
|
"generic": "Something went wrong. Please try again.",
|
|
"network": {
|
|
"offline": "Can't reach the server. Check the connection and try again."
|
|
},
|
|
"access": {
|
|
"denied": "You don't have permission to do this ({{key}}).",
|
|
"override_possible": "A manager can approve this ({{key}}).",
|
|
"override_invalid": "This approval isn't valid any more. Ask a manager again.",
|
|
"not_overridable": "{{key}} can't be approved by a manager.",
|
|
"approver_lacks_key": "That account can't approve this ({{key}}).",
|
|
"override_rate_limited": "Too many wrong PINs. Wait a few minutes and try again.",
|
|
"unknown_key": "There is no permission {{key}}.",
|
|
"cannot_grant": "You can only give permissions you have yourself ({{key}})."
|
|
},
|
|
"module": {
|
|
"disabled": "The {{module}} module is turned off.",
|
|
"not_licensed": "This site's license doesn't include {{module}}.",
|
|
"unknown": "There is no module {{module}}.",
|
|
"cannot_disable": "{{module}} is part of the core and can't be turned off."
|
|
},
|
|
"license": {
|
|
"limit_reached": "License limit reached for {{module}} {{limit}} ({{max}}).",
|
|
"expired": "The license has expired.",
|
|
"history_limited": "This license shows only the last {{days}} days of history ({{module}})."
|
|
},
|
|
"auth": {
|
|
"invalid_credentials": "Wrong username or password.",
|
|
"session_ended": "Your session has ended. Please log in again.",
|
|
"session_exists": "You're already logged in on another {{client}}. Log out there first.",
|
|
"login_mode_not_allowed": "This way of logging in isn't enabled ({{mode}}).",
|
|
"mode_needs_device": "Logging in by {{mode}} only works on a paired device.",
|
|
"username_required": "Enter your username.",
|
|
"client_not_allowed": "This account can't use the {{client}} app.",
|
|
"session_not_found": "Session not found.",
|
|
"support_not_configured": "Support access isn't set up on this site.",
|
|
"support_code_invalid": "That support code is wrong or has expired. Ask for a new challenge.",
|
|
"support_rate_limited": "Too many support challenges. Wait a few minutes and try again.",
|
|
"wrong_pin": "Wrong PIN. {{attempts_left}} tries left before you are signed out."
|
|
},
|
|
"device": {
|
|
"revoked": "This device was removed. Pair it again.",
|
|
"not_paired": "This device isn't paired with the venue.",
|
|
"out_of_scope": "A {{app}} device can't do this ({{key}}).",
|
|
"required": "This login belongs to a paired device. Use it from that device.",
|
|
"not_found": "Device {{device_id}} not found.",
|
|
"pair_code_invalid": "That pairing code is wrong or has expired.",
|
|
"pair_rate_limited": "Too many pairing requests. Wait a few minutes and try again.",
|
|
"not_an_app": "{{app}} is not an app that runs on a device.",
|
|
"login_mode_invalid": "A {{app}} device can't use the login mode {{mode}}.",
|
|
"link_invalid": "Device {{device_id}} can't be linked to this device."
|
|
},
|
|
"validation": {
|
|
"invalid": "Some fields are invalid.",
|
|
"unknown_language": "Unsupported language: {{language}}.",
|
|
"unknown_timezone": "Unknown time zone: {{timezone}}.",
|
|
"setting_value": "{{key}} can't be set to \"{{value}}\".",
|
|
"device_config": "This device setting is not valid: {{key}}."
|
|
},
|
|
"internal": {
|
|
"error": "Something went wrong on the server (request {{request_id}})."
|
|
},
|
|
"order": {
|
|
"not_found": "Order {{order_id}} not found.",
|
|
"not_sold_here": "{{name}} isn't sold for this kind of order.",
|
|
"lines_required": "This app sent the order in an old format. Update the app and send it again.",
|
|
"line": {
|
|
"product_unavailable": "{{name}} isn't available any more (line {{line}}).",
|
|
"option_gone": "{{name}}: a chosen option doesn't exist any more (line {{line}}). Remove it and add it again.",
|
|
"choice_missing": "{{name}}: a required choice is missing (line {{line}}).",
|
|
"quantity": "{{name}}: that quantity isn't allowed (line {{line}}).",
|
|
"price": "{{name}}: that price change isn't allowed (line {{line}}).",
|
|
"client_price": "{{name}}: the app sent its own prices, but prices come from the server (line {{line}}). Update the app."
|
|
},
|
|
"items_not_combinable": "These lines can't be combined: only unpaid lines of the same item, with the same choices, note, price and kitchen state, and no discount, deal or tab."
|
|
},
|
|
"notification": {
|
|
"not_found": "Notification {{notification_id}} not found."
|
|
},
|
|
"catalog": {
|
|
"unknown_category": "There is no category {{category_id}}.",
|
|
"primary_not_listed": "The main category ({{category_id}}) must be one of the product's categories."
|
|
},
|
|
"system": {
|
|
"log_not_found": "There is no log file for {{date}}."
|
|
},
|
|
"kds": {
|
|
"item_not_found": "Item {{item_id}} not found on this order.",
|
|
"item_claimed": "{{name}} is already on this item.",
|
|
"claim_needs_staff": "Only a staff member can claim an item."
|
|
},
|
|
"pos": {
|
|
"line_invalid": "Cart line {{line}} can't be sold as chosen ({{reason}}).",
|
|
"shift_required": "Start your shift before selling.",
|
|
"payment_invalid": "This payment doesn't add up ({{reason}}).",
|
|
"fiscal_vat_missing": "Fiscal receipts are on, but these products have no VAT group: {{names}}.",
|
|
"table_not_found": "Table {{table_id}} not found.",
|
|
"table_not_yours": "{{table}} isn't in your zones. A manager can add the zone to your account.",
|
|
"items_changed": "Some of these items were paid or cancelled in the meantime. Check the order and try again.",
|
|
"order_unpaid": "Items still unpaid: {{count}}. Take the payment or cancel them first."
|
|
},
|
|
"online": {
|
|
"not_found": "Online order {{order_id}} not found.",
|
|
"status_changed": "This online order was changed on another screen in the meantime. Check where it is now."
|
|
},
|
|
"refund": {
|
|
"invalid": "This refund doesn't add up ({{reason}}).",
|
|
"too_old": "Only payments from today's business day can be refunded at the counter.",
|
|
"items_changed": "Some of these items were refunded in the meantime. Check the order and try again."
|
|
},
|
|
"fees": {
|
|
"area_not_found": "Delivery area {{area_id}} not found.",
|
|
"rule_not_found": "Fee rule {{rule_id}} not found.",
|
|
"area_in_use": "This area is used by fee rules: {{rules}}. Change those rules first.",
|
|
"order_invalid": "The new order must list every rule once.",
|
|
"vat_group_unknown": "VAT group {{vat_group_id}} isn't one of the fiscal machine's groups."
|
|
},
|
|
"reservation": {
|
|
"not_found": "Booking {{reservation_id}} not found.",
|
|
"status_changed": "This booking was changed on another screen in the meantime (it is now {{current}}).",
|
|
"table_unknown": "Table {{table_id}} not found.",
|
|
"table_busy": "That table already has an open order. Pick another table, or close that order first."
|
|
},
|
|
"display": {
|
|
"media_unknown": "Image {{name}} not found.",
|
|
"media_type": "Upload a JPG, PNG, WebP or GIF image.",
|
|
"media_too_big": "The image is too big (at most {{max_mb}} MB).",
|
|
"qr_url_missing": "Enter the link the QR code opens."
|
|
},
|
|
"media": {
|
|
"not_found": "File {{media_id}} isn't in the media library.",
|
|
"type": "Upload a picture (JPG, PNG, WebP or GIF) or a video (MP4 or WebM).",
|
|
"too_big": "The file is too big (at most {{max_mb}} MB).",
|
|
"too_many_pixels": "The picture is too large (at most {{max_mp}} megapixels).",
|
|
"unreadable": "This picture can't be read. Save it again as JPG or PNG and upload it.",
|
|
"in_use": "This file is used by {{uses}}. Remove it there first."
|
|
},
|
|
"caller_id": {
|
|
"key_invalid": "The phone system's key is missing or wrong."
|
|
}
|
|
}
|