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:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user