- Add separate translation_language setting (independent from interface language) - Implement 3-step onboarding for new users: 1. Choose interface language 2. Choose learning language 3. Choose translation language - Fix localization issues when using callback.message (user_id from state) - Add UserService.get_user_by_id() method - Add get_user_translation_lang() helper in i18n - Update all handlers to use correct translation language - Add localization keys for onboarding (ru/en/ja) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
694 B
Python
26 lines
694 B
Python
"""Add translation_language field to users table
|
|
|
|
Revision ID: 20251207_translation_language
|
|
Revises: 20251206_word_translations
|
|
Create Date: 2025-12-07
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '20251207_translation_language'
|
|
down_revision: Union[str, None] = '20251206_word_translations'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('users', sa.Column('translation_language', sa.String(2), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('users', 'translation_language')
|