mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 07:08:04 +00:00
Simplified the /api/translations endpoint to return the complete Translation TypedDict object instead of manually constructing a custom nested structure. This makes the code more maintainable, type-safe, and consistent with the translation schema. Backend changes (src/web/app.py): - Removed 116 lines of manual translation object construction - Now returns _.t directly (full Translation object) - Reduced endpoint from ~120 lines to 3 lines Frontend changes (web/static/app.js): - Updated to work with full Translation object structure - All GUI translations now accessed via t.gui.* paths - Login status uses t.login.status.* (from Translation.login) - Websocket status uses t.gui.websocket.* - Updated all render functions and Socket.IO handlers Benefits: - Simpler and more maintainable backend code - Type-safe: returns exact Translation TypedDict structure - Frontend can access all translation sections (gui, login, error, status) - Follows the defined TypedDict schema exactly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>