Localization #15
Reference in New Issue
Block a user
Delete Branch "feature/localization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add i18n support to the blog web UI with 4 languages (en/ru/fr/de), 80 translation keys, automatic Accept-Language detection, persistent locale cookie, and a language switcher dropdown in the header. - Infrastructure: TranslationService, translation dicts, convenience _() - Presentation: locale middleware, /web/lang/{locale} switcher route - Templates: all 9 templates use {{ _(key, current_locale) }} - Tests: 26 tests across TranslationService, locale detection helpers - Docs: TEST_MODEL.md and FEATURE_INFRASTRUCTURE.md updated with TC-UNIT-811-821Error handlers had a separate Jinja2Templates instance without the _ global function, causing UndefinedError when rendering base.html (which now calls {{ _(key, current_locale) }}). - Register _() from translator module as Jinja2 global on error_handlers templates - Add current_locale to get_template_context() from request.state.locale