webdev1881/scale-S2L / .claude/skills/localization
localization
UnverifiedЛокализация киоска и админки, коды ошибок бэкенда, форматы дат. Использовать при добавлении любой строки интерфейса, новой ошибки или работе с frontend/src/shared/i18n.ts.
Локализация
Язык интерфейса — украинский (переключается в админке), язык кода и комментариев — русский.
- Ни одной строки интерфейса в компонентах. Все тексты — в
frontend/src/shared/i18n.ts, оба языка (uk,ru) правятся одновременно. Язык хранится в настройках устройства, а не в браузере: киоск обслуживает покупателей, а не владельца ноутбука. - Бэкенд не отдаёт готовые фразы об ошибках. Он возвращает коды из
app/errors.py(print.paper_out,scale.no_link, …), интерфейс переводит их черезtranslateError. Новая ошибка = код вerrors.py+ ключ в обоих словарях. - Точка в ключе словаря — разделитель пути в vue-i18n, поэтому коды хранятся с
подчёркиванием (
print_paper_out), аtranslateErrorделает замену. - Единственный текст, который переводит бэкенд, — надписи на этикетке
(
app/services/i18n.py): они впечатываются в растр, фронтенд их не видит. - Даты и время форматируются через
localeTag(), а не зашитымru-RU.
Перенос строки в сообщении задаётся самим текстом ( в строке перевода), а не
шириной экрана: тост киоска печатает его как есть (white-space: pre-line,
выравнивание по центру). Так «Закінчився папір» и «Покличте співробітника магазину»
стоят двумя строками, где их и рвут по смыслу, а не там, куда придётся.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |