From dc838d097f963b30a8fdcf582f308559a52271c6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 20 Jan 2022 00:05:14 -0500 Subject: [PATCH] Add translations for panel config/users config/api keys/ role config --- .../templates/panel/panel_config.html | 30 +++--- .../templates/panel/panel_edit_role.html | 42 ++++----- .../templates/panel/panel_edit_user.html | 74 +++++++-------- .../panel/panel_edit_user_apikeys.html | 39 ++++---- app/translations/en_EN.json | 94 ++++++++++++++++++- 5 files changed, 179 insertions(+), 100 deletions(-) diff --git a/app/frontend/templates/panel/panel_config.html b/app/frontend/templates/panel/panel_config.html index 115d83eb..80df0eba 100644 --- a/app/frontend/templates/panel/panel_config.html +++ b/app/frontend/templates/panel/panel_config.html @@ -4,7 +4,7 @@ {% end %} -{% block title %}Crafty Controller - Panel Config{% end %} +{% block title %}Crafty Controller - {{ translate('panelConfig', 'pageTitle', data['lang']) }}{% end %} {% block content %} @@ -15,7 +15,7 @@
@@ -31,11 +31,11 @@
-

Users

+

{{ translate('panelConfig', 'users', data['lang']) }}

-
  Add New User
+
  {{ translate('panelConfig', 'newUser', data['lang']) }}
@@ -43,11 +43,11 @@ - User - Enabled - Allowed Servers - Assigned Roles - Edit + {{ translate('panelConfig', 'user', data['lang']) }} + {{ translate('panelConfig', 'enabled', data['lang']) }} + {{ translate('panelConfig', 'allowedServers', data['lang']) }} + {{ translate('panelConfig', 'assignedRoles', data['lang']) }} + {{ translate('panelConfig', 'edit', data['lang']) }} @@ -94,9 +94,9 @@
-

Roles

+

{{ translate('panelConfig', 'roles', data['lang']) }}

- +
@@ -104,10 +104,10 @@ - Role - Allowed Servers - Role Users - Edit + {{ translate('panelConfig', 'role', data['lang']) }} + {{ translate('panelConfig', 'allowedServers', data['lang']) }} + {{ translate('panelConfig', 'roleUsers', data['lang']) }} + {{ translate('panelConfig', 'edit', data['lang']) }} diff --git a/app/frontend/templates/panel/panel_edit_role.html b/app/frontend/templates/panel/panel_edit_role.html index 7b34292d..fa2e1b52 100644 --- a/app/frontend/templates/panel/panel_edit_role.html +++ b/app/frontend/templates/panel/panel_edit_role.html @@ -4,7 +4,7 @@ {% end %} -{% block title %}Crafty Controller - Edit Role{% end %} +{% block title %}Crafty Controller - {{ translate('rolesConfig', 'pageTitle', data['lang']) }}{% end %} {% block content %} @@ -16,13 +16,13 @@
{% if data['new_user'] %} - Delete User
- You cannot delete something that does not yet exist + {{ translate('userConfig', 'deleteUserB', data['lang']) }}
+ {{ translate('userConfig', 'notExist', data['lang']) }} {% elif data['user']['superuser'] %} - Delete User
- You cannot delete a superuser + {{ translate('userConfig', 'deleteUserB', data['lang']) }}
+ {{ translate('userConfig', 'delSuper', data['lang']) }} {% else %} -
@@ -252,8 +246,8 @@ console.log("User to delete is {{ data['user']['username'] }}"); bootbox.confirm({ - title: "{% raw translate('usersConfig', 'deleteUser', data['lang']) %}"+"{{ data['user']['username'] }}", - message: "{{ translate('usersConfig', 'confirmDelete', data['lang']) }}", + title: "{% raw translate('userConfig', 'deleteUser', data['lang']) %}"+"{{ data['user']['username'] }}", + message: "{{ translate('userConfig', 'confirmDelete', data['lang']) }}", buttons: { cancel: { label: ' {{ translate("serverBackups", "cancel", data['lang']) }}' diff --git a/app/frontend/templates/panel/panel_edit_user_apikeys.html b/app/frontend/templates/panel/panel_edit_user_apikeys.html index 87706dea..d9fa48c2 100644 --- a/app/frontend/templates/panel/panel_edit_user_apikeys.html +++ b/app/frontend/templates/panel/panel_edit_user_apikeys.html @@ -15,7 +15,7 @@