Skip to content

Commit dbb0a81

Browse files
Pawan8538alexgarel
andauthored
fix: Set fallback=True in i18n.py (#161)
Udds proper handling for missing translation files to prevent server crashes. A fallback mechanism ensures the application remains stable when locale files are unavailable. Part of: #155 Co-authored-by: Alex Garel <alex@garel.org>
1 parent cbc15ce commit dbb0a81

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/i18n.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_translation(lang):
2424
"knowledge-panel",
2525
localedir=str(I18N_DIR),
2626
languages=[lang, DEFAULT_LANGUAGE],
27+
fallback=True,
2728
)
2829
_translations[lang] = lang_translations
2930
return _translations[lang]

0 commit comments

Comments
 (0)