diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index df2bb932..3e4a753a 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -606,10 +606,11 @@ class PanelHandler(BaseHandler): page_data['super-disabled'] = '' else: page_data['super-disabled'] = 'disabled' - for file in os.listdir(os.path.join(helper.root_dir, 'app', 'translations')): + for file in sorted(os.listdir(os.path.join(helper.root_dir, 'app', 'translations'))): if file.endswith('.json'): - if file != str(page_data['languages'][0] + '.json'): - page_data['languages'].append(file.split('.')[0]) + if file not in helper.get_setting('disabled_language_files'): + if file != str(page_data['languages'][0] + '.json'): + page_data['languages'].append(file.split('.')[0]) template = "panel/panel_edit_user.html" @@ -738,8 +739,9 @@ class PanelHandler(BaseHandler): for file in sorted(os.listdir(os.path.join(helper.root_dir, 'app', 'translations'))): if file.endswith('.json'): - if file != str(page_data['languages'][0] + '.json'): - page_data['languages'].append(file.split('.')[0]) + if file not in helper.get_setting('disabled_language_files'): + if file != str(page_data['languages'][0] + '.json'): + page_data['languages'].append(file.split('.')[0]) if user_id is None: self.redirect("/panel/error?error=Invalid User ID") diff --git a/app/config/config.json b/app/config/config.json index 7f3ff5f6..aad33f03 100644 --- a/app/config/config.json +++ b/app/config/config.json @@ -14,6 +14,7 @@ "virtual_terminal_lines": 70, "max_log_lines": 700, "max_audit_entries": 300, + "disabled_language_files": ["lol_EN.json", ""], "keywords": ["help", "chunk"], "allow_nsfw_profile_pictures": false }