- products.translations / categories.translations (Alembic 0033, core/menu_languages.py: el + en,
name / description / quick options by their base name; catalog.translation). Empty = the text
as typed; no machine translation (owner).
- In the manager's product editor ("In English" / "In Greek", quick extras), the category dialog,
and a menu board's Language (signage MenuContent.language).
- Customer screens only: cloud snapshot names / descriptions per language (C-2), the menu tablet's
EL / EN switch the names (localize), signage boards; tickets, KDS, counter, phones keep the base.
- Catalogue bundles carry translations; @xenia/access menuLanguages.js (a backend test compares).
- e2e: manager (the other language saved), menu tablet (EN / EL names), QR table (English on
the menu, the base name on the kitchen's order, Greek page as typed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
842 B
Python
27 lines
842 B
Python
"""The menu in other languages (plan step 6.4, core/menu_languages.py): a product's and a
|
|
category's translations as JSON {language: {field: text}}; null = none.
|
|
|
|
Revision ID: 0033_menu_translations
|
|
Revises: 0032_product_allergens
|
|
Create Date: 2026-11-18 15:00:00
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = '0033_menu_translations'
|
|
down_revision = '0032_product_allergens'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
for table in ('products', 'categories'):
|
|
with op.batch_alter_table(table, schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('translations', sa.Text(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
for table in ('products', 'categories'):
|
|
with op.batch_alter_table(table, schema=None) as batch_op:
|
|
batch_op.drop_column('translations')
|