InkyPi is currently hardcoded in English across the web interface and plugin outputs. To make this project more accessible to non-English speaking users, I propose implementing a translation system (i18n).
Proposed Technical Approach
Since InkyPi is built with Flask, I suggest using Flask-Babel:
Backend: Use standard gettext or ngettext functions in Python files (e.g., src/blueprints/.py and src/plugins/**/.py).
Frontend: Update Jinja2 templates (e.g., src/templates/*.html) to use the {{ _('...') }} syntax.
Localisation files: Store translations in a translations/ directory (PO/MO files).
Web UI: Navigation menus, button labels, and settings descriptions.
Weather Plugin: Data labels like "Sunrise", "Sunset", "Wind", and "Humidity".
Calendar Plugin: Day names and event labels.
Settings: Timezone and theme labels.
How I can help
I am willing to:
- Help implement the Flask-Babel infrastructure.
- Extract existing strings into translation keys.
- Provide the initial French (fr) translation.
I'd love to hear your thoughts on this and if you have a preferred library or architecture for handling translations!
InkyPi is currently hardcoded in English across the web interface and plugin outputs. To make this project more accessible to non-English speaking users, I propose implementing a translation system (i18n).
Proposed Technical Approach
Since InkyPi is built with Flask, I suggest using Flask-Babel:
Backend: Use standard gettext or ngettext functions in Python files (e.g., src/blueprints/.py and src/plugins/**/.py).
Frontend: Update Jinja2 templates (e.g., src/templates/*.html) to use the {{ _('...') }} syntax.
Localisation files: Store translations in a translations/ directory (PO/MO files).
Web UI: Navigation menus, button labels, and settings descriptions.
Weather Plugin: Data labels like "Sunrise", "Sunset", "Wind", and "Humidity".
Calendar Plugin: Day names and event labels.
Settings: Timezone and theme labels.
How I can help
I am willing to:
I'd love to hear your thoughts on this and if you have a preferred library or architecture for handling translations!