feat: JLPT levels for Japanese, custom practice scenarios, UI improvements
- Add separate level systems: CEFR (A1-C2) for European languages, JLPT (N5-N1) for Japanese - Store levels per language in new `levels_by_language` JSON field - Add custom scenario option in AI practice mode - Show action buttons after practice ends (new dialogue, tasks, words) - Fix level display across all handlers to use correct level system - Add Alembic migration for levels_by_language field - Update all locale files (ru, en, ja) with new keys 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
27
migrations/versions/20251205_add_levels_by_language.py
Normal file
27
migrations/versions/20251205_add_levels_by_language.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""add levels_by_language JSON field to users
|
||||
|
||||
Revision ID: 20251205_levels_by_lang
|
||||
Revises: 20251204_add_vocab_lang
|
||||
Create Date: 2025-12-05
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects.postgresql import JSON
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '20251205_levels_by_lang'
|
||||
down_revision = '20251204_add_vocab_lang'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Добавляем JSON поле для хранения уровней по языкам
|
||||
# Формат: {"en": "B1", "ja": "N4", ...}
|
||||
op.add_column('users', sa.Column('levels_by_language', JSON, nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('users', 'levels_by_language')
|
||||
Reference in New Issue
Block a user