Skip to content

P-039: Django i18n — bilingual UI (tracking) #69

Description

@dholbach

Tracking issue for P-039: make all user-facing UI text translatable via Django's i18n framework so the app can run in German or English without code changes.

Scaffold (done in #67)

  • LocaleMiddleware, LANGUAGES, LOCALE_PATHS in settings
  • django.conf.urls.i18n wired up
  • gettext in Dockerfile
  • locale/de/ and locale/en/ directories
  • {% load i18n %} + lang= attribute in base.html
  • ./dev.py i18n command
  • inquiry_confirm_delete.html — reference implementation

Language switcher

Templates (~50 remaining)

Each template needs {% load i18n %} + {% trans %} / {% blocktrans %} on all UI strings, then English msgstr values in locale/en/LC_MESSAGES/django.po.

See inquiry_confirm_delete.html as the reference implementation.
Run ./dev.py i18n after wrapping each template to extract and compile strings.

  • Per-template issues to be filed (good first issue — one per template)

Python-side (medium complexity)

  • messages.*() calls in views → _() wrappers
  • Form labels / help_text_() wrappers
  • Model verbose_name / help_text_() wrappers
  • Admin labels → _() wrappers

Notes

  • German is the primary language — DE strings stay as-is; EN needs translation in .po files
  • .po source files are committed; .mo compiled files are gitignored (generated locally)
  • Language switching uses a session cookie via LocaleMiddleware — no URL prefix needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions