Fix i18n: strip UTF-8 BOM so translations load again.

PowerShell rewrites had added a BOM that made Python json.load fail, so the UI showed raw keys like nav_servers.
This commit is contained in:
orohi
2026-07-27 04:40:44 +03:00
parent 80160d0ef4
commit 4c19099b04
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ def load_translations():
if f.endswith('.json'):
lang = f.split('.')[0]
try:
with open(os.path.join(trans_dir, f), 'r', encoding='utf-8') as tf:
with open(os.path.join(trans_dir, f), 'r', encoding='utf-8-sig') as tf:
TRANSLATIONS[lang] = json.load(tf)
except Exception as e:
logger.error(f"Error loading translation {f}: {e}")