mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-05 03:01:13 -06:00
fix(i18n): add Norwegian translation support and improve error logging
- Add 'nb' (Norwegian Bokmål) to translation extraction script This ensures Norwegian translations are properly included when extracting and updating translation catalogs. - Improve translation compilation error logging Add exc_info=True to log full exception tracebacks when translation compilation fails, making it easier to diagnose issues with missing or corrupted .mo files. Fixes issue where Norwegian (norsk) translations were not working due to missing compiled .mo files. The app will now properly compile Norwegian translations on startup, and any compilation errors will be logged with full stack traces for debugging.
This commit is contained in:
@@ -14,7 +14,7 @@ def main():
|
||||
run(['pybabel', 'extract', '-F', 'babel.cfg', '-o', 'messages.pot', '.'])
|
||||
|
||||
# Initialize languages if not already
|
||||
languages = ['en', 'nl', 'de', 'fr', 'it', 'fi', 'es', 'ar', 'he']
|
||||
languages = ['en', 'nl', 'de', 'fr', 'it', 'fi', 'es', 'ar', 'he', 'nb']
|
||||
for lang in languages:
|
||||
po_dir = os.path.join('translations', lang, 'LC_MESSAGES')
|
||||
po_path = os.path.join(po_dir, 'messages.po')
|
||||
|
||||
Reference in New Issue
Block a user