mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add option to disable language files through config.json
This commit is contained in:
parent
826d4d081f
commit
8e874ca997
@ -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")
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user