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}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"nav_servers": "Servers",
|
||||
"nav_users": "Users",
|
||||
"nav_invites": "Invite links",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"nav_servers": "سرورها",
|
||||
"nav_users": "کاربران",
|
||||
"nav_invites": "لینک دعوت",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"nav_servers": "Serveurs",
|
||||
"nav_users": "Utilisateurs",
|
||||
"nav_invites": "Liens d\u0027invitation",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"nav_servers": "Серверы",
|
||||
"nav_users": "Пользователи",
|
||||
"nav_invites": "Ссылки",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"nav_servers": "服务器",
|
||||
"nav_users": "用户列表",
|
||||
"nav_invites": "邀请链接",
|
||||
|
||||
Reference in New Issue
Block a user