feat(i18n): multilingual support using gettext
What does this MR do and why?
This MR introduces minimal internationalization (i18n) support using gettext, without changing the existing application behavior.
The goal is to prepare the codebase for future multilingual support by making user-facing strings translatable, while keeping English as the default language.
Changes made
- Added i18n initialization module (
i18n.py) with safe gettext setup (fallback enabled) - Integrated gettext into the application
- Marked top-level user-facing strings in
app.pyusing_() - Added Babel configuration (
babel.cfg) - Generated translation template (
messages.pot) - Added Babel dependency to:
requirements.txtpyproject.toml
- Added safe handling for Streamlit sidebar to avoid breaking tests
- Updated
.gitignoreto exclude compiled files (*.mo) - Removed unnecessary files (e.g.,
.codex)
Behavior
- Application continues to run entirely in English
- No runtime language switching is introduced
- No translation files (
.po/.mo) are used at this stage - No impact on existing functionality
Verification
-
✅ All existing tests pass successfully -
✅ Ruff linting and formatting checks pass -
✅ Application output remains unchanged -
✅ No regressions observed
Notes
- This MR only includes i18n infrastructure
- Localization (translation files such as
.po/.mo) is intentionally excluded - Language switching and actual translations will be introduced in a separate MR