feat: foundations for the manager conversion (platform-v2 step 6.1)

- Backend: every HTTPException in routers/ is an error code now (260 raises, ~105 new codes,
  texts in en + el); XeniaError(detail=...) keeps the three v1-shaped answers old pages read;
  bad / unknown tokens answer auth.session_ended; test_errors refuses new HTTPExceptions.
- Manager: v2.json is the list of pages on the v2 rules: scripts/lint.mjs lints them,
  tests/v2-guards.test.mjs refuses Greek and colour literals, `strict` paths make
  set-state-in-effect an error.
- src/live/useLiveQuery.js (react-query + live events + refresh on reconnect); Signed in now
  uses it.
- Dead manager files removed (3.1k lines unreachable from main.jsx).
- Tests: backend 544 passed, manager unit 33, run-all (no Android) passed (manager's live
  bell check passed on a rerun).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 04:31:36 +02:00
co-authored by Claude Opus 5.5
parent 218a6c9c5e
commit 2dc5da446e
48 changed files with 918 additions and 3498 deletions
+166 -5
View File
@@ -22,7 +22,8 @@
"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}})."
"history_limited": "This license shows only the last {{days}} days of history ({{module}}).",
"locked": "The system was locked by the administrator. Contact support."
},
"auth": {
"invalid_credentials": "Wrong username or password.",
@@ -36,7 +37,12 @@
"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."
"wrong_pin": "Wrong PIN. {{attempts_left}} tries left before you are signed out.",
"password_current_required": "Enter your current password to set a new one.",
"no_password": "This account has no password yet.",
"password_wrong": "The current password is wrong.",
"password_too_short": "The password must be at least {{min}} characters long.",
"pin_too_short": "The PIN must be at least {{min}} digits long."
},
"device": {
"revoked": "This device was removed. Pair it again.",
@@ -55,7 +61,13 @@
"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}}."
"device_config": "This device setting is not valid: {{key}}.",
"datetime": "That date or time isn't valid.",
"choice": "{{field}} can't be {{value}}.",
"range": "{{field}} must be between {{min}} and {{max}}.",
"positive": "{{field}} must be more than zero.",
"missing": "{{field}} is required.",
"lan_ip": "Enter a local network IPv4 address (e.g. 192.168.1.50 or 10.0.0.5)."
},
"internal": {
"error": "Something went wrong on the server (request {{request_id}})."
@@ -72,14 +84,38 @@
"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."
"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.",
"not_yours": "This order isn't one of your tables.",
"not_open": "This order isn't open any more.",
"item_not_found": "That item isn't on the order any more.",
"item_paid": "This item is already paid.",
"item_not_active": "Only items still on the order can be changed.",
"nothing_paid": "There are no paid items to undo.",
"cannot_close": "This order can't be closed now ({{status}}).",
"no_active_items": "None of these items are on the order any more.",
"waiter_assigned": "That waiter is already on this order.",
"assignment_not_found": "That waiter isn't on this order.",
"same_table": "The order is already on that table.",
"same_order": "An order can't be joined with itself.",
"target_not_found": "The other order isn't there any more.",
"split_quantity": "Split into 1 to {{max}} pieces.",
"discounts_off": "Discounts are turned off for this venue.",
"no_customer": "Give the order a customer first.",
"item_not_tabbable": "This item is already {{status}}: it can't go on a tab.",
"product_unavailable": "Product {{product_id}} isn't available."
},
"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."
"primary_not_listed": "The main category ({{category_id}}) must be one of the product's categories.",
"category_not_found": "Category not found.",
"parent_not_found": "The parent category doesn't exist.",
"nest_has_children": "A category with sub-categories can't go under another one.",
"too_deep": "Categories go at most two levels deep.",
"own_parent": "A category can't be its own parent.",
"group_not_found": "Option group not found."
},
"system": {
"log_not_found": "There is no log file for {{date}}."
@@ -153,5 +189,130 @@
"menu_tablet": {
"no_table": "This tablet isn't at a table, so it can't call a waiter.",
"call_too_soon": "A waiter was just called. Try again in {{seconds}} seconds."
},
"settings": {
"invalid_json": "The settings must be valid JSON.",
"unknown_key": "There is no setting {{key}}."
},
"business_day": {
"already_open": "A business day is already open.",
"none_open": "No business day is open.",
"closed": "The venue isn't open: a manager must open the business day first.",
"orders_open": "{{open_orders}} table(s) still open, {{partially_paid}} with unpaid items.",
"not_found": "Business day not found.",
"not_closed": "Only a closed business day can be edited.",
"close_in_future": "The closing time can't be in the future.",
"close_before_last_order": "The closing time can't be earlier than the last order's close ({{time}}).",
"delete_open": "An open business day can't be deleted. Close it first.",
"has_shifts": "This business day has {{count}} shift(s). Delete those first."
},
"chat": {
"not_found": "Conversation not found.",
"not_participant": "You're not in this conversation.",
"empty_message": "The message is empty.",
"system_group": "You can't leave the staff group.",
"leave_direct": "A one-to-one conversation can't be left.",
"direct_two": "A one-to-one conversation has exactly two people.",
"group_name": "A group conversation needs a name."
},
"customer": {
"not_found": "Customer not found."
},
"transfer": {
"wrong_type": "This file isn't a {{expected}} export.",
"version": "This export's version isn't supported."
},
"contact": {
"not_found": "Contact not found."
},
"expense": {
"not_found": "Expense not found."
},
"flag": {
"not_found": "Mark not found.",
"in_use": "This mark is on {{count}} table(s). Remove it there first.",
"invalid_ids": "Some of these marks don't exist."
},
"staff_message": {
"template_not_found": "Message template not found.",
"not_found": "Message not found."
},
"note": {
"not_found": "Note not found."
},
"todo": {
"not_found": "To-do not found."
},
"printer": {
"not_found": "That printer isn't there or is turned off."
},
"print_job": {
"not_found": "That print job isn't there any more.",
"not_pending": "Only tickets still waiting to print can be cancelled."
},
"table": {
"not_found": "Table not found.",
"busy": "That table already has an open order.",
"has_order": "A table with an open order can't be deleted or turned off.",
"name_too_long": "The table names would be too long ({{name}}: at most {{max}} characters). Shorten the prefix or make fewer."
},
"table_group": {
"name_taken": "There is already a group with that name.",
"not_found": "Table group not found."
},
"prep_zone": {
"not_found": "Prep zone not found."
},
"price_group": {
"not_found": "Price group not found."
},
"modifier": {
"not_found": "Price rule not found."
},
"deal": {
"not_found": "Deal not found."
},
"product": {
"not_found": "Product not found.",
"in_past_orders": "This product is in past orders, so it can't be deleted. Archive it instead."
},
"staff": {
"not_found": "Staff member not found.",
"username_taken": "That username is already taken.",
"superadmin_protected": "A superadmin account can't be changed.",
"superadmin_only": "Only a superadmin can give the superadmin role.",
"role_invalid": "There is no role {{role}}.",
"avatar_type": "The photo must be a picture file.",
"assignment_exists": "That assignment already exists.",
"assignment_not_found": "Assignment not found."
},
"schedule": {
"shift_not_found": "Scheduled shift not found."
},
"setup": {
"done": "Setup is already done: a manager account exists."
},
"shift": {
"already_active": "This person already has a shift going.",
"start_needs_manager": "Starting the shift needs a manager's approval.",
"end_needs_manager": "Ending the shift needs a manager's approval.",
"others_need_manager": "Only managers can start shifts for other staff.",
"none_active": "No shift is going.",
"not_found": "Shift not found.",
"not_yours": "This shift belongs to someone else.",
"ended": "This shift has already ended.",
"on_break": "A break is already going.",
"no_break": "No break is going.",
"delete_active": "A shift that is still going can't be deleted. End it first."
},
"tab": {
"not_found": "Tab not found.",
"already_open": "This customer already has an open tab.",
"over_balance": "That's more than the balance ({{balance}}).",
"has_balance": "The tab still owes {{balance}}. Pay it or forgive it first."
},
"waste": {
"not_found": "Throwaway entry not found.",
"not_today": "Only throwaways of the open business day can be deleted."
}
}