Translate UI and user-facing messages to Ukrainian (#5)
- All frontend pages, labels, notices and errors; html lang=uk, uk-UA money format - Brand "Assistant System" in the top bar and page title - Backend error details returned to the UI (auth, orders, receipts, cash registers, Checkbox/CRM/NP errors) and CLI output - Tests updated for the new messages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,10 +39,10 @@ class ExoCrmClient:
|
||||
data = response.json()
|
||||
except ValueError as exc:
|
||||
# PHP-notice'ы CRM перед JSON — признак неверных параметров.
|
||||
raise CrmError(f"CRM вернула не JSON: {response.text[:300]}") from exc
|
||||
raise CrmError(f"CRM повернула не JSON: {response.text[:300]}") from exc
|
||||
|
||||
if not isinstance(data, dict):
|
||||
raise CrmError(f"Неожиданный ответ CRM: {str(data)[:300]}")
|
||||
raise CrmError(f"Неочікувана відповідь CRM: {str(data)[:300]}")
|
||||
return data
|
||||
|
||||
async def get_orders(self, *, status: str) -> list[OrderOut]:
|
||||
@@ -57,7 +57,7 @@ class ExoCrmClient:
|
||||
},
|
||||
)
|
||||
if data.get("status") != "OK":
|
||||
raise CrmError(f"CRM вернула ошибку: {_errors_text(data) or 'неизвестная ошибка'}")
|
||||
raise CrmError(f"CRM повернула помилку: {_errors_text(data) or 'невідома помилка'}")
|
||||
return [OrderOut.model_validate(order) for order in data.get("result") or []]
|
||||
|
||||
async def set_status(self, *, order_id: str, status: str) -> None:
|
||||
@@ -73,6 +73,6 @@ class ExoCrmClient:
|
||||
if isinstance(result, dict) and result.get("Status") == "Success":
|
||||
return
|
||||
details = _errors_text(data) or (
|
||||
str(result) if result is not None else "нет ответа по заказу"
|
||||
str(result) if result is not None else "немає відповіді щодо замовлення"
|
||||
)
|
||||
raise CrmError(f"CRM не сменила статус заказа {order_id} на {status}: {details}")
|
||||
raise CrmError(f"CRM не змінила статус замовлення {order_id} на {status}: {details}")
|
||||
|
||||
Reference in New Issue
Block a user