From 5ace391bd9828e58c23767b00d90be6ad16b6443 Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Tue, 18 Nov 2025 11:35:57 +0100 Subject: [PATCH] feat(i18n): Add comprehensive translation support across all templates - Replace hardcoded English strings with translation function calls in 36 template files - Update translation files for all supported languages (ar, de, es, fi, fr, he, it, nb, nl, no) - Add over 55,000 new translation entries across all language files - Update extract_translations.py to use 'python -m babel.messages.frontend' instead of pybabel - Improve internationalization coverage for UI elements including: * Skip to content links * Sidebar toggle buttons * Command palette placeholders * Admin dashboard elements * Form labels and buttons * Report templates * Payment and invoice views This commit significantly improves the application's multilingual support by making previously hardcoded strings translatable. --- app/templates/admin/api_tokens.html | 6 +- app/templates/admin/backups.html | 10 +- app/templates/admin/clear_cache.html | 10 +- app/templates/admin/dashboard.html | 4 +- app/templates/admin/restore.html | 2 +- app/templates/admin/settings.html | 22 +- app/templates/admin/telemetry.html | 4 +- app/templates/admin/user_form.html | 2 +- app/templates/audit_logs/list.html | 62 +- app/templates/auth/edit_profile.html | 6 +- app/templates/auth/profile.html | 6 +- app/templates/base.html | 6 +- app/templates/clients/list.html | 4 +- app/templates/expenses/list.html | 6 +- app/templates/expenses/view.html | 6 +- app/templates/invoices/view.html | 10 +- app/templates/main/search.html | 2 +- app/templates/mileage/list.html | 2 +- app/templates/payments/create.html | 4 +- app/templates/payments/list.html | 6 +- app/templates/payments/view.html | 4 +- app/templates/per_diem/list.html | 2 +- app/templates/projects/list.html | 6 +- app/templates/recurring_invoices/list.html | 22 +- app/templates/reports/index.html | 12 +- app/templates/reports/project_report.html | 2 +- app/templates/reports/summary.html | 2 +- app/templates/reports/task_report.html | 2 +- app/templates/reports/user_report.html | 2 +- app/templates/saved_filters/list.html | 2 +- .../settings/keyboard_shortcuts.html | 4 +- app/templates/tasks/list.html | 14 +- .../time_entry_templates/create.html | 10 +- app/templates/time_entry_templates/edit.html | 10 +- app/templates/timer/timer_page.html | 20 +- scripts/complete_dutch_translations.py | 167 + scripts/complete_nl_translations.py | 515 + scripts/complete_spanish_translations.py | 214 + .../complete_spanish_translations_final.py | 713 + scripts/extract_translations.py | 3 + scripts/sync_translations.py | 84 + scripts/translate_all_spanish.py | 786 ++ scripts/translate_dutch.py | 253 + scripts/translate_spanish.py | 212 + translations/ar/LC_MESSAGES/messages.po | 6687 +++++++++- translations/ar/LC_MESSAGES/messages.po.bak | 704 + translations/de/LC_MESSAGES/messages.po | 6679 +++++++++- translations/de/LC_MESSAGES/messages.po.bak | 703 + translations/es/LC_MESSAGES/messages.po | 6680 +++++++++- translations/es/LC_MESSAGES/messages.po.bak | 704 + translations/fi/LC_MESSAGES/messages.po | 6665 +++++++++- translations/fi/LC_MESSAGES/messages.po.bak | 703 + translations/fr/LC_MESSAGES/messages.po | 6669 +++++++++- translations/fr/LC_MESSAGES/messages.po.bak | 703 + translations/he/LC_MESSAGES/messages.po | 6648 +++++++++- translations/he/LC_MESSAGES/messages.po.bak | 704 + translations/it/LC_MESSAGES/messages.po | 6669 +++++++++- translations/it/LC_MESSAGES/messages.po.bak | 703 + translations/nb/LC_MESSAGES/messages.po | 1731 +-- translations/nb/LC_MESSAGES/messages.po.bak | 10779 ++++++++++++++++ translations/nl/LC_MESSAGES/messages.po | 6814 +++++++++- translations/nl/LC_MESSAGES/messages.po.bak | 703 + translations/no/LC_MESSAGES/messages.po | 1555 +-- translations/no/LC_MESSAGES/messages.po.bak | 10779 ++++++++++++++++ 64 files changed, 85173 insertions(+), 2050 deletions(-) create mode 100644 scripts/complete_dutch_translations.py create mode 100644 scripts/complete_nl_translations.py create mode 100644 scripts/complete_spanish_translations.py create mode 100644 scripts/complete_spanish_translations_final.py create mode 100644 scripts/sync_translations.py create mode 100644 scripts/translate_all_spanish.py create mode 100644 scripts/translate_dutch.py create mode 100644 scripts/translate_spanish.py create mode 100644 translations/ar/LC_MESSAGES/messages.po.bak create mode 100644 translations/de/LC_MESSAGES/messages.po.bak create mode 100644 translations/es/LC_MESSAGES/messages.po.bak create mode 100644 translations/fi/LC_MESSAGES/messages.po.bak create mode 100644 translations/fr/LC_MESSAGES/messages.po.bak create mode 100644 translations/he/LC_MESSAGES/messages.po.bak create mode 100644 translations/it/LC_MESSAGES/messages.po.bak create mode 100644 translations/nb/LC_MESSAGES/messages.po.bak create mode 100644 translations/nl/LC_MESSAGES/messages.po.bak create mode 100644 translations/no/LC_MESSAGES/messages.po.bak diff --git a/app/templates/admin/api_tokens.html b/app/templates/admin/api_tokens.html index 2a2ae8e..c14baf3 100644 --- a/app/templates/admin/api_tokens.html +++ b/app/templates/admin/api_tokens.html @@ -126,7 +126,7 @@