summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorraul2014-08-06 16:31:54 +0200
committerraul2014-08-06 16:31:54 +0200
commit244a87be2aa4b7721fca1afefcdeae8f44478add (patch)
treec1666b7208d3ebdf988f3ab18f35465d21ee9a65
parent[i18n] Altering JSONs through the web interface is now possible (diff)
downloadslx-admin-244a87be2aa4b7721fca1afefcdeae8f44478add.tar.gz
slx-admin-244a87be2aa4b7721fca1afefcdeae8f44478add.tar.xz
slx-admin-244a87be2aa4b7721fca1afefcdeae8f44478add.zip
[i18n]Corrected the system and added warnings to the table lines of the Language Administration page
-rw-r--r--config.php2
-rw-r--r--lang/de/.json1
-rw-r--r--lang/de/administration/messages.json2
-rw-r--r--lang/de/administration/template.json2
-rw-r--r--lang/de/messages-hardcoded.json22
-rw-r--r--lang/de/messages.json41
-rw-r--r--lang/en/.json1
-rw-r--r--lang/en/administration/messages.json2
-rw-r--r--lang/en/administration/template.json2
-rw-r--r--lang/en/messages-hardcoded.json22
-rw-r--r--lang/en/messages.json41
-rw-r--r--lang/pt/.json1
-rw-r--r--lang/pt/administration/messages.json2
-rw-r--r--lang/pt/administration/template.json2
-rw-r--r--lang/pt/messages-hardcoded.json21
-rw-r--r--lang/pt/messages.json41
-rw-r--r--modules/admin.inc.php87
-rw-r--r--templates/administration/messages.html126
-rw-r--r--templates/administration/template.html8
19 files changed, 158 insertions, 268 deletions
diff --git a/config.php b/config.php
index 110f3261..cd271e0c 100644
--- a/config.php
+++ b/config.php
@@ -1,7 +1,7 @@
<?php
// This might leak sensitive information. Never enable in production!
-define('CONFIG_DEBUG', true);
+define('CONFIG_DEBUG', false);
define('CONFIG_SESSION_DIR', '/tmp/openslx');
define('CONFIG_SESSION_TIMEOUT', 86400 * 3);
diff --git a/lang/de/.json b/lang/de/.json
new file mode 100644
index 00000000..9bc301f1
--- /dev/null
+++ b/lang/de/.json
@@ -0,0 +1 @@
+{"loginfail":"Benutzername oder Kennwort falsch","token":"Ung\u00fcltiges Token. CSRF Angriff?","adduser":"Benutzer erfolgreich hinzugef\u00fcgt","password":"Passwort und Passwortbest\u00e4tigung stimmen nicht \u00fcberein","empty":"Das Archiv enth\u00e4lt keine Dateien oder Verzeichnisse","no":"Keine ausreichenden Rechte, um auf diese Seite zuzugreifen","settings":"Einstellungen wurden aktualisiert","debug":"Der Debug-Modus ist aktiv!","value":"Der Wert {{1}} ist ung\u00fcltig f\u00fcr die Option {{0}} und wurde ignoriert","invalid":"Ausgew\u00e4hlte Template ist nicht g\u00fcltig","remote":"Parsen der empfangenen Daten fehlgeschlagen ({{0}})","missing":"Es wurde keine Datei ausgew\u00e4hlt!","upload":"Upload schlug fehl: {{0}}","config":"Konfiguration mit ID {{0}} existiert nicht","error":"Konnte Archiv nicht nach {{0}} entpacken - {{1}}","module":"Modul {{0}} wird noch durch Konfiguration {{1}} verwendet","taskmanager":"Taskmanager hat ung\u00fcltige Daten zur\u00fcckgeliefert","task":"Ausf\u00fchrung fehlgeschlagen: {{0}}","news":"News gel\u00f6scht","reboot":"Sicherheitsabfrage zum Reboot nicht best\u00e4tigt","lang_unknwonTaskManager":"Unbekannter Taskmanager-Fehler","lang_configurationCompilation":"Konfiguration zusammenstellen","lang_moduleAdd":"Modul hinzuf\u00fcgen","lang_adAuthentication":"Active Directory Authentifizierung","lang_adModule":"Mit diesem Modul ist die Anmeldung an den Client PCs mit den Benutzerkonten eines Active Directory m\u00f6glich. Je nach Konfiguration ist auch die Nutzung eines Benutzerverzeichnisses auf dem Client m\u00f6glich.","lang_authentication":"Authentifizierung","lang_generic":"Generisch","lang_addCustomModuleInfo":"Mit einem Erweiterten Modul ist es m\u00f6glich, beliebige Dateien zum Grundsystem hinzuzuf\u00fcgen Nutzen Sie dieses Modul, um z.B. spezielle Konfigurationsdateien auf den Client PCs zu verwenden, die sich nicht mit einem der anderen Wizards erstellen l\u00e4sst. Das Hinzuf\u00fcgen eines Erweiterten Moduls erfordert in der Regel zumindest grundlegende Systemkenntnisse im Linuxbereich.","lang_days":"Tag(e)","lang_hours":"Stunde(n)","lang_specificLogo":"Einrichtungsspezifisches Logo","lang_institutionLogo":"Logo der Einrichtung","lang_infoLogo":"Dieses Modul dient dem Hinzuf\u00fcgen eines Logos der Hochschule\/Universit\u00e4t, welches dann z.B. auf dem Anmeldebildschirm angezeigt wird.","lang_location":"Lokalisierung","lang_contentOf":"Inhalt von \"","lang_serverConfiguration":"Serverseitige Konfiguration","lang_login":"Anmelden","lang_createUser":"Benutzer anlegen"} \ No newline at end of file
diff --git a/lang/de/administration/messages.json b/lang/de/administration/messages.json
index 33e97746..5639bdb3 100644
--- a/lang/de/administration/messages.json
+++ b/lang/de/administration/messages.json
@@ -1 +1 @@
-{"lang_messages":"","lang_templateMessagesHelp":"","lang_germanJSON":"","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_messagesHardcoded":"","lang_back":"","lang_newTag":"","lang_update":""} \ No newline at end of file
+{"lang_messages":"","lang_templateMessagesHelp":"","lang_germanJSON":"","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_back":"","lang_newTag":"","lang_update":"Hochladen","lang_messagesHardcoded":""} \ No newline at end of file
diff --git a/lang/de/administration/template.json b/lang/de/administration/template.json
index c5feab4c..31a9ab69 100644
--- a/lang/de/administration/template.json
+++ b/lang/de/administration/template.json
@@ -1 +1 @@
-{"lang_germanJSON":"","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_back":"Z\u00fcruck","lang_update":"Hochladen"} \ No newline at end of file
+{"lang_templateAdminHelp":"","lang_germanJSON":"","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"Portugiesisch TAG","lang_back":"Z\u00fcruck","lang_update":"Hochladen"} \ No newline at end of file
diff --git a/lang/de/messages-hardcoded.json b/lang/de/messages-hardcoded.json
index cecb66ca..16c98d2c 100644
--- a/lang/de/messages-hardcoded.json
+++ b/lang/de/messages-hardcoded.json
@@ -1,21 +1 @@
-{
- "lang_unknwonTaskManager":"Unbekannter Taskmanager-Fehler",
- "lang_configurationCompilation":"Konfiguration zusammenstellen",
- "lang_moduleAdd":"Modul hinzufügen",
- "lang_adAuthentication":"Active Directory Authentifizierung",
- "lang_adModule":"Mit diesem Modul ist die Anmeldung an den Client PCs mit den Benutzerkonten eines Active Directory möglich. Je nach Konfiguration ist auch die Nutzung eines Benutzerverzeichnisses auf dem Client möglich.",
- "lang_authentication":"Authentifizierung",
- "lang_generic":"Generisch",
- "lang_addCustomModuleInfo":"Mit einem Erweiterten Modul ist es möglich, beliebige Dateien zum Grundsystem hinzuzufügen Nutzen Sie dieses Modul, um z.B. spezielle Konfigurationsdateien auf den Client PCs zu verwenden, die sich nicht mit einem der anderen Wizards erstellen lässt. Das Hinzufügen eines Erweiterten Moduls erfordert in der Regel zumindest grundlegende Systemkenntnisse im Linuxbereich.",
- "lang_addCustomModule":"Eigenes Modul hinzufügen",
- "lang_days":"Tag(e)",
- "lang_hours":"Stunde(n)",
- "lang_specificLogo":"Einrichtungsspezifisches Logo",
- "lang_institutionLogo":"Logo der Einrichtung",
- "lang_infoLogo":"Dieses Modul dient dem Hinzufügen eines Logos der Hochschule/Universität, welches dann z.B. auf dem Anmeldebildschirm angezeigt wird.",
- "lang_location":"Lokalisierung",
- "lang_contentOf":"Inhalt von \"",
- "lang_serverConfiguration":"Serverseitige Konfiguration",
- "lang_login":"Anmelden",
- "lang_createUser":"Benutzer anlegen"
-}
+{"lang_unknwonTaskManager":"Unbekannter Taskmanager-Fehler","lang_configurationCompilation":"Konfiguration zusammenstellen","lang_moduleAdd":"Modul hinzuf\u00fcgen","lang_adAuthentication":"Active Directory Authentifizierung","lang_adModule":"Mit diesem Modul ist die Anmeldung an den Client PCs mit den Benutzerkonten eines Active Directory m\u00f6glich. Je nach Konfiguration ist auch die Nutzung eines Benutzerverzeichnisses auf dem Client m\u00f6glich.","lang_authentication":"Authentifizierung","lang_generic":"Generisch","lang_addCustomModuleInfo":"Mit einem Erweiterten Modul ist es m\u00f6glich, beliebige Dateien zum Grundsystem hinzuzuf\u00fcgen Nutzen Sie dieses Modul, um z.B. spezielle Konfigurationsdateien auf den Client PCs zu verwenden, die sich nicht mit einem der anderen Wizards erstellen l\u00e4sst. Das Hinzuf\u00fcgen eines Erweiterten Moduls erfordert in der Regel zumindest grundlegende Systemkenntnisse im Linuxbereich.","lang_days":"Tag(e)","lang_hours":"Stunde(n)","lang_specificLogo":"Einrichtungsspezifisches Logo","lang_institutionLogo":"Logo der Einrichtung","lang_infoLogo":"Dieses Modul dient dem Hinzuf\u00fcgen eines Logos der Hochschule\/Universit\u00e4t, welches dann z.B. auf dem Anmeldebildschirm angezeigt wird.","lang_location":"Lokalisierung","lang_contentOf":"Inhalt von \"","lang_serverConfiguration":"Serverseitige Konfiguration","lang_login":"Anmelden","lang_createUser":"Benutzer anlegen"} \ No newline at end of file
diff --git a/lang/de/messages.json b/lang/de/messages.json
index 64ffcb58..78ecc2b9 100644
--- a/lang/de/messages.json
+++ b/lang/de/messages.json
@@ -1,40 +1 @@
-{
- "loginfail": "Benutzername oder Kennwort falsch",
- "token": "Ungültiges Token. CSRF Angriff?",
- "adduser-disabled": "Keine ausreichenden Rechte, um weitere Benutzer hinzuzufügen",
- "password-mismatch": "Passwort und Passwortbestätigung stimmen nicht überein",
- "empty-field": "Ein Feld wurde nicht ausgefüllt",
- "adduser-success": "Benutzer erfolgreich hinzugefügt",
- "no-permission": "Keine ausreichenden Rechte, um auf diese Seite zuzugreifen",
- "settings-updated": "Einstellungen wurden aktualisiert",
- "debug-mode": "Der Debug-Modus ist aktiv!",
- "value-invalid": "Der Wert {{1}} ist ungültig für die Option {{0}} und wurde ignoriert",
- "invalid-action": "Ungültige Aktion: {{0}}",
- "remote-timeout": "Konnte Ressource {{0}} nicht herunterladen ({{1}})",
- "remote-parse-failed": "Parsen der empfangenen Daten fehlgeschlagen ({{0}})",
- "missing-file": "Es wurde keine Datei ausgewählt!",
- "invalid-file": "Die Datei {{0}} existiert nicht!",
- "upload-complete": "Upload von {{0}} war erfolgreich",
- "upload-failed": "Upload schlug fehl: {{0}}",
- "config-activated": "Konfiguration {{0}} wurde aktiviert",
- "config-invalid": "Konfiguration mit ID {{0}} existiert nicht",
- "error-write": "Fehler beim Schreiben von {{0}}",
- "error-read": "Fehler beim Lesen von {{0}}",
- "error-archive": "Korruptes Archiv oder nicht unterstütztes Format",
- "error-rename": "Konnte {{0}} nicht in {{1}} umbenennen",
- "error-nodir": "Das Verzeichnis {{0}} existiert nicht.",
- "empty-archive": "Das Archiv enthält keine Dateien oder Verzeichnisse",
- "error-extract": "Konnte Archiv nicht nach {{0}} entpacken - {{1}}",
- "module-added": "Modul erfolgreich hinzugefügt",
- "module-deleted": "Modul {{0}} wurde gelöscht",
- "module-in-use": "Modul {{0}} wird noch durch Konfiguration {{1}} verwendet",
- "taskmanager-error": "Verbindung zum Taskmanager fehlgeschlagen",
- "taskmanager-format": "Taskmanager hat ungültige Daten zurückgeliefert",
- "task-error": "Ausführung fehlgeschlagen: {{0}}",
- "invalid-ip": "Kein Interface ist auf die Adresse {{0}} konfiguriert",
- "news-save-success": "News erfolgreich aktualisiert",
- "news-empty": "Es wurde keine News in der Datenbank gefunden",
- "news-del-success": "News gelöscht",
- "reboot-unconfirmed": "Sicherheitsabfrage zum Reboot nicht bestätigt",
- "invalid-template":"Ausgewählte Template ist nicht gültig"
-}
+{"loginfail":"Benutzername oder Kennwort falsch","token":"Ung\u00fcltiges Token. CSRF Angriff?","adduser-disabled":"Keine ausreichenden Rechte, um weitere Benutzer hinzuzuf\u00fcgen","password-mismatch":"Passwort und Passwortbest\u00e4tigung stimmen nicht \u00fcberein","empty-field":"Ein Feld wurde nicht ausgef\u00fcllt","adduser-success":"Benutzer erfolgreich hinzugef\u00fcgt","no-permission":"Keine ausreichenden Rechte, um auf diese Seite zuzugreifen","settings-updated":"Einstellungen wurden aktualisiert","debug-mode":"Der Debug-Modus ist aktiv!","value-invalid":"Der Wert {{1}} ist ung\u00fcltig f\u00fcr die Option {{0}} und wurde ignoriert","invalid-action":"Ung\u00fcltige Aktion: {{0}}","remote-timeout":"Konnte Ressource {{0}} nicht herunterladen ({{1}})","remote-parse-failed":"Parsen der empfangenen Daten fehlgeschlagen ({{0}})","missing-file":"Es wurde keine Datei ausgew\u00e4hlt!","invalid-file":"Die Datei {{0}} existiert nicht!","upload-complete":"Upload von {{0}} war erfolgreich","upload-failed":"Upload schlug fehl: {{0}}","config-activated":"Konfiguration {{0}} wurde aktiviert","config-invalid":"Konfiguration mit ID {{0}} existiert nicht","error-write":"Fehler beim Schreiben von {{0}}","error-read":"Fehler beim Lesen von {{0}}","error-archive":"Korruptes Archiv oder nicht unterst\u00fctztes Format","error-rename":"Konnte {{0}} nicht in {{1}} umbenennen","error-nodir":"Das Verzeichnis {{0}} existiert nicht.","empty-archive":"Das Archiv enth\u00e4lt keine Dateien oder Verzeichnisse","error-extract":"Konnte Archiv nicht nach {{0}} entpacken - {{1}}","module-added":"Modul erfolgreich hinzugef\u00fcgt","module-deleted":"Modul {{0}} wurde gel\u00f6scht","module-in-use":"Modul {{0}} wird noch durch Konfiguration {{1}} verwendet","taskmanager-error":"Verbindung zum Taskmanager fehlgeschlagen","taskmanager-format":"Taskmanager hat ung\u00fcltige Daten zur\u00fcckgeliefert","task-error":"Ausf\u00fchrung fehlgeschlagen: {{0}}","invalid-ip":"Kein Interface ist auf die Adresse {{0}} konfiguriert","news-save-success":"News erfolgreich aktualisiert","news-empty":"Es wurde keine News in der Datenbank gefunden","news-del-success":"News gel\u00f6scht","reboot-unconfirmed":"Sicherheitsabfrage zum Reboot nicht best\u00e4tigt","invalid-template":"Ausgew\u00e4hlte Template ist nicht g\u00fcltig"} \ No newline at end of file
diff --git a/lang/en/.json b/lang/en/.json
new file mode 100644
index 00000000..fa92867d
--- /dev/null
+++ b/lang/en/.json
@@ -0,0 +1 @@
+{"loginfail":"Username or Password incorrect","token":"Invalid token. CSRF attack?","adduser":"User successfully added","password":"Password and password confirmation do not match","empty":"The archive contains no files or directories","no":"No sufficient privileges to access this page","settings":"Settings have been updated","debug":"The debug mode is active!","value":"The value {{1}} is invalid for option {{0}} and has been ignored","invalid":"Selected template is not valid","remote":"Parsing the received data failed ({{0}})","missing":"There was no file selected!","upload":"Upload failed: {{0}}","config":"Configuration with id {{0}} does not exist","error":"Could not unpack archive {{0}} to {{1}}","module":"Module {{0}} is still used by Configuration {{1}}","taskmanager":"Task Manager has returned invalid data","task":"Execution failed: {{0}}","news":"News deleted","reboot":"Confirmation prompt to reboot not confirmed","lang_unknwonTaskManager":"Unknown Task Manager error","lang_configurationCompilation":"Compile configuration","lang_moduleAdd":"Add Module","lang_adAuthentication":"Active Directory Authentication","lang_adModule":"This module makes possible the application to the client PCs with the user accounts of an Active Directory. Depending on the configuration, the use of a user directory on the client is possible.","lang_authentication":"Authentication","lang_generic":"Generic","lang_addCustomModuleInfo":"With an extended module it is possible to add any files to the basic system that uses this module, for example to use specific configuration files, which can not be created with one of the other Wizards. Adding an Extended module usually requires at least basic knowledge of the Linux system.","lang_days":"Day(s)","lang_hours":"Hour(s)","lang_specificLogo":"Institution Specific Logo","lang_institutionLogo":"Institution Logo","lang_infoLogo":"This module is used to add the logo of a College \/ University, which then, for example, is displayed on the login screen.","lang_location":"Location","lang_contentOf":"Content of \"","lang_serverConfiguration":"Server-side Configuration","lang_login":"Login","lang_createUser":"Create User"} \ No newline at end of file
diff --git a/lang/en/administration/messages.json b/lang/en/administration/messages.json
index 33e97746..494ad108 100644
--- a/lang/en/administration/messages.json
+++ b/lang/en/administration/messages.json
@@ -1 +1 @@
-{"lang_messages":"","lang_templateMessagesHelp":"","lang_germanJSON":"","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_messagesHardcoded":"","lang_back":"","lang_newTag":"","lang_update":""} \ No newline at end of file
+{"lang_messages":"Messages","lang_templateMessagesHelp":"","lang_germanJSON":"German JSON","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_back":"","lang_newTag":"","lang_update":"Upload","lang_messagesHardcoded":""} \ No newline at end of file
diff --git a/lang/en/administration/template.json b/lang/en/administration/template.json
index 53581b59..17b657b9 100644
--- a/lang/en/administration/template.json
+++ b/lang/en/administration/template.json
@@ -1 +1 @@
-{"lang_germanJSON":"German JSON","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"","lang_portugueseTAG":"","lang_back":"Back","lang_update":"Update"} \ No newline at end of file
+{"lang_templateAdminHelp":"","lang_germanJSON":"German JSON","lang_englishJSON":"","lang_portugueseJSON":"","lang_germanTAG":"","lang_englishTAG":"English TAG","lang_portugueseTAG":"Portuguese TAG","lang_back":"Back","lang_update":"Update"} \ No newline at end of file
diff --git a/lang/en/messages-hardcoded.json b/lang/en/messages-hardcoded.json
index 4b7ba4fa..b5e7d335 100644
--- a/lang/en/messages-hardcoded.json
+++ b/lang/en/messages-hardcoded.json
@@ -1,21 +1 @@
-{
- "lang_unknwonTaskManager":"Unknown Task Manager error",
- "lang_configurationCompilation":"Compile configuration",
- "lang_moduleAdd":"Add Module",
- "lang_adAuthentication":"Active Directory Authentication",
- "lang_adModule":"This module makes possible the application to the client PCs with the user accounts of an Active Directory. Depending on the configuration, the use of a user directory on the client is possible.",
- "lang_authentication":"Authentication",
- "lang_generic":"Generic",
- "lang_addCustomModuleInfo":"With an extended module it is possible to add any files to the basic system that uses this module, for example to use specific configuration files, which can not be created with one of the other Wizards. Adding an Extended module usually requires at least basic knowledge of the Linux system.",
- "lang_addCustomModule":"Add Custom Module",
- "lang_days":"Day(s)",
- "lang_hours":"Hour(s)",
- "lang_specificLogo":"Institution Specific Logo",
- "lang_institutionLogo":"Institution Logo",
- "lang_infoLogo":"This module is used to add the logo of a College / University, which then, for example, is displayed on the login screen.",
- "lang_location":"Location",
- "lang_contentOf":"Content of \"",
- "lang_serverConfiguration":"Server-side Configuration",
- "lang_login":"Login",
- "lang_createUser":"Create User"
-}
+{"lang_unknwonTaskManager":"Unknown Task Manager error","lang_configurationCompilation":"Compile configuration","lang_moduleAdd":"Add Module","lang_adAuthentication":"Active Directory Authentication","lang_adModule":"This module makes possible the application to the client PCs with the user accounts of an Active Directory. Depending on the configuration, the use of a user directory on the client is possible.","lang_authentication":"Authentication","lang_generic":"Generic","lang_addCustomModuleInfo":"With an extended module it is possible to add any files to the basic system that uses this module, for example to use specific configuration files, which can not be created with one of the other Wizards. Adding an Extended module usually requires at least basic knowledge of the Linux system.","lang_days":"Day(s)","lang_hours":"Hour(s)","lang_specificLogo":"Institution Specific Logo","lang_institutionLogo":"Institution Logo","lang_infoLogo":"This module is used to add the logo of a College \/ University, which then, for example, is displayed on the login screen.","lang_location":"Location","lang_contentOf":"Content of \"","lang_serverConfiguration":"Server-side Configuration","lang_login":"Login","lang_createUser":"Create Usere"} \ No newline at end of file
diff --git a/lang/en/messages.json b/lang/en/messages.json
index 60e6baba..0f92b33d 100644
--- a/lang/en/messages.json
+++ b/lang/en/messages.json
@@ -1,40 +1 @@
-{
- "loginfail": "Username or Password incorrect",
- "token": "Invalid token. CSRF attack?",
- "adduser-disabled": "Insufficient privileges to add more users",
- "password-mismatch": "Password and password confirmation do not match",
- "empty-field": "A field was not filled",
- "adduser-success": "User successfully added",
- "no-permission": "No sufficient privileges to access this page",
- "settings-updated": "Settings have been updated",
- "debug-mode": "The debug mode is active!",
- "value-invalid": "The value {{1}} is invalid for option {{0}} and has been ignored",
- "invalid-action": "Invalid action: {{0}}",
- "remote-timeout": "Could not download resource {{0}} ({{1}})",
- "remote-parse-failed": "Parsing the received data failed ({{0}})",
- "missing-file": "There was no file selected!",
- "invalid-file": "The file {{0}} does not exist!",
- "upload-complete": "Upload of {{0}} was successful",
- "upload-failed": "Upload failed: {{0}}",
- "config-activated": "Configuration {{0}} has been activated",
- "config-invalid": "Configuration with id {{0}} does not exist",
- "error-write": "Failed to write {{0}}",
- "error-read": "Error reading {{0}}",
- "error-archive": "Corrupted archive or unsupported format",
- "error-rename": "Could not rename {{0}} into {{1}}",
- "error-nodir": "The directory {{0}} does not exist.",
- "empty-archive": "The archive contains no files or directories",
- "error-extract": "Could not unpack archive {{0}} to {{1}}",
- "module-added": "Module successfully added",
- "module-deleted": "Module {{0}} was deleted",
- "module-in-use": "Module {{0}} is still used by Configuration {{1}}",
- "taskmanager-error": "Failed to connect to the Task Manager",
- "taskmanager-format": "Task Manager has returned invalid data",
- "task-error": "Execution failed: {{0}}",
- "invalid-ip": "No interface is configured with the address {{0}}",
- "news-save-success": "News updated successfully",
- "news-empty": "There was no news found in the database",
- "news-del-success": "News deleted",
- "reboot-unconfirmed": "Confirmation prompt to reboot not confirmed",
- "invalid-template":"Selected template is not valid"
-}
+{"loginfail":"Username or Password incorrect","token":"Invalid token. CSRF attack?","adduser-disabled":"Insufficient privileges to add more users","password-mismatch":"Password and password confirmation do not match","empty-field":"A field was not filled","adduser-success":"User successfully added","no-permission":"No sufficient privileges to access this page","settings-updated":"Settings have been updated","debug-mode":"The debug mode is active!","value-invalid":"The value {{1}} is invalid for option {{0}} and has been ignored","invalid-action":"Invalid action: {{0}}","remote-timeout":"Could not download resource {{0}} ({{1}})","remote-parse-failed":"Parsing the received data failed ({{0}})","missing-file":"There was no file selected!","invalid-file":"The file {{0}} does not exist!","upload-complete":"Upload of {{0}} was successful","upload-failed":"Upload failed: {{0}}","config-activated":"Configuration {{0}} has been activated","config-invalid":"Configuration with id {{0}} does not exist","error-write":"Failed to write {{0}}","error-read":"Error reading {{0}}","error-archive":"Corrupted archive or unsupported format","error-rename":"Could not rename {{0}} into {{1}}","error-nodir":"The directory {{0}} does not exist.","empty-archive":"The archive contains no files or directories","error-extract":"Could not unpack archive {{0}} to {{1}}","module-added":"Module successfully added","module-deleted":"Module {{0}} was deleted","module-in-use":"Module {{0}} is still used by Configuration {{1}}","taskmanager-error":"Failed to connect to the Task Manager","taskmanager-format":"Task Manager has returned invalid data","task-error":"Execution failed: {{0}}","invalid-ip":"No interface is configured with the address {{0}}","news-save-success":"News updated successfully","news-empty":"There was no news found in the database","news-del-success":"News deleted","reboot-unconfirmed":"Confirmation prompt to reboot not confirmed","invalid-template":"Selected template is not valid"} \ No newline at end of file
diff --git a/lang/pt/.json b/lang/pt/.json
new file mode 100644
index 00000000..d21fc0f5
--- /dev/null
+++ b/lang/pt/.json
@@ -0,0 +1 @@
+{"loginfail":"Nome de usu\u00e1rio ou senha incorreta","token":"Token inv\u00e1lido. Ataque CSRF?","adduser":"Usu\u00e1rio adicionado com sucesso","password":"Senha e confirma\u00e7\u00e3o de senha n\u00e3o s\u00e3o iguais","empty":"O arquivo n\u00e3o cont\u00e9m arquivos ou diret\u00f3rios","no":"N\u00e3o h\u00e1 privil\u00e9gios suficientes para acessar essa p\u00e1gina","settings":"As configura\u00e7\u00f5es foram atualizadas","debug":"O modo de depura\u00e7\u00e3o est\u00e1 ativo!","value":"O valor {{1}} \u00e9 inv\u00e1lido para op\u00e7\u00e3o {{0}} e foi ignorado","invalid":"Template selecionado n\u00e3o \u00e9 v\u00e1lido","remote":"An\u00e1lise dos dados recebidos falhou ({{0}})","missing":"N\u00e3o havia nenhum arquivo selecionado!","upload":"Envio falhou: {{0}}","config":"Configura\u00e7\u00e3o com id {{0}} n\u00e3o existe","error":"N\u00e3o foi poss\u00edvel descompactar arquivo {{0}} para {{1}}","module":"M\u00f3dulo {{0}} ainda \u00e9 usado pela configura\u00e7\u00e3o {{1}}","taskmanager":"Gerenciador de Tarefas retornou dados inv\u00e1lidos","task":"Falha na execu\u00e7\u00e3o: {{0}}","news":"Not\u00edcia exclu\u00edda","reboot":"Confirma\u00e7\u00e3o para reinicializar n\u00e3o foi confirmada","lang_unknwonTaskManager":"Erro desconhecido do Gerenciador de Tarefas","lang_configurationCompilation":"Compilar configura\u00e7\u00e3o","lang_moduleAdd":"Adicionar M\u00f3dulo","lang_adAuthentication":"Autentica\u00e7\u00e3o do Active Directory","lang_adModule":"Este m\u00f3dulo possibilita a aplica\u00e7\u00e3o para os computadores clientes com as contas de usu\u00e1rio de um Active Directory. Dependendo da configura\u00e7\u00e3o, o uso de um diret\u00f3rio de usu\u00e1rio no cliente \u00e9 poss\u00edvel.","lang_authentication":"Autentica\u00e7\u00e3o","lang_generic":"Gen\u00e9rico","lang_addCustomModuleInfo":"Com um m\u00f3dulo estendido, \u00e9 poss\u00edvel adicionar os arquivos para o sistema b\u00e1sico que usa este m\u00f3dulo, por exemplo, para usar arquivos de configura\u00e7\u00e3o espec\u00edficas, que n\u00e3o podem ser criados com um dos outros assistentes. Adicionar um m\u00f3dulo estendido normalmente exige pelo menos um conhecimento b\u00e1sico do sistema Linux.","lang_days":"Dia(s)","lang_hours":"Hora(s)","lang_specificLogo":"Logotipo Espec\u00edfico da Institui\u00e7\u00e3o","lang_institutionLogo":"Logotipo da Institui\u00e7\u00e3o","lang_infoLogo":"Este m\u00f3dulo \u00e9 usado para adicionar o logotipo de uma faculdade \/ universidade, que ent\u00e3o, por exemplo, \u00e9 exibido na tela de login.","lang_location":"Localiza\u00e7\u00e3o","lang_contentOf":"Conte\u00fado de \"","lang_serverConfiguration":"Configura\u00e7\u00e3o do servidor","lang_login":"Entrar","lang_createUser":"Criar Usu\u00e1rio"} \ No newline at end of file
diff --git a/lang/pt/administration/messages.json b/lang/pt/administration/messages.json
index 53f77d98..b5880236 100644
--- a/lang/pt/administration/messages.json
+++ b/lang/pt/administration/messages.json
@@ -1 +1 @@
-{"lang_messages":"Mensagens","lang_templateMessagesHelp":"Aqui \u00e9 poss\u00edvel alterar as mensagens exibidas no site.","lang_germanJSON":"JSON Alem\u00e3o","lang_englishJSON":"JSON Ingl\u00eas","lang_portugueseJSON":"JSON Portugu\u00eas","lang_germanTAG":"Mensagem em Alem\u00e3o","lang_englishTAG":"Mensagem em Ingl\u00eas","lang_portugueseTAG":"Mensagem em Portugu\u00eas","lang_messagesHardcoded":"Mensagens Hardcoded","lang_back":"Voltar","lang_newTag":"Nova Mensagem","lang_update":"Carregar"} \ No newline at end of file
+{"lang_messages":"Mensagens","lang_templateMessagesHelp":"Aqui \u00e9 poss\u00edvel alterar as mensagens exibidas no site.","lang_germanJSON":"JSON Alem\u00e3o","lang_englishJSON":"JSON Ingl\u00eas","lang_portugueseJSON":"JSON Portugu\u00eas","lang_germanTAG":"Mensagem em Alem\u00e3o","lang_englishTAG":"Mensagem em Ingl\u00eas","lang_portugueseTAG":"Mensagem em Portugu\u00eas","lang_back":"Voltar","lang_newTag":"Nova Mensagem","lang_update":"Carregar","lang_messagesHardcoded":"Mensagens Hardcoded"} \ No newline at end of file
diff --git a/lang/pt/administration/template.json b/lang/pt/administration/template.json
index aeb7d292..41f602dd 100644
--- a/lang/pt/administration/template.json
+++ b/lang/pt/administration/template.json
@@ -1 +1 @@
-{"lang_germanJSON":"JSON Alem\u00e3o","lang_englishJSON":"JSON Ingl\u00eas","lang_portugueseJSON":"JSON Portugu\u00eas","lang_germanTAG":"TAG em Alem\u00e3o","lang_englishTAG":"TAG em Ingl\u00eas","lang_portugueseTAG":"TAG em Portugu\u00eas","lang_back":"Voltar","lang_update":"Carregar"} \ No newline at end of file
+{"lang_templateAdminHelp":"","lang_germanJSON":"JSON Alem\u00e3o","lang_englishJSON":"JSON Ingl\u00eas","lang_portugueseJSON":"JSON Portugu\u00eas","lang_germanTAG":"TAG em Alem\u00e3o","lang_englishTAG":"TAG em Ingl\u00eas","lang_portugueseTAG":"TAG em Portugu\u00eas","lang_back":"Voltar","lang_update":"Carregar"} \ No newline at end of file
diff --git a/lang/pt/messages-hardcoded.json b/lang/pt/messages-hardcoded.json
index 3e20e813..a233eb38 100644
--- a/lang/pt/messages-hardcoded.json
+++ b/lang/pt/messages-hardcoded.json
@@ -1,20 +1 @@
-{
- "lang_unknwonTaskManager":"Erro desconhecido do Gerenciador de Tarefas",
- "lang_configurationCompilation":"Compilar configuração",
- "lang_moduleAdd":"Adicionar Módulo",
- "lang_adAuthentication":"Autenticação do Active Directory",
- "lang_adModule":"Este módulo possibilita a aplicação para os computadores clientes com as contas de usuário de um Active Directory. Dependendo da configuração, o uso de um diretório de usuário no cliente é possível.",
- "lang_authentication":"Autenticação",
- "lang_generic":"Genérico",
- "lang_addCustomModuleInfo":"Com um módulo estendido, é possível adicionar os arquivos para o sistema básico que usa este módulo, por exemplo, para usar arquivos de configuração específicas, que não podem ser criados com um dos outros assistentes. Adicionar um módulo estendido normalmente exige pelo menos um conhecimento básico do sistema Linux.",
- "lang_days":"Dia(s)",
- "lang_hours":"Hora(s)",
- "lang_specificLogo":"Logotipo Específico da Instituição",
- "lang_institutionLogo":"Logotipo da Instituição",
- "lang_infoLogo":"Este módulo é usado para adicionar o logotipo de uma faculdade / universidade, que então, por exemplo, é exibido na tela de login.",
- "lang_location":"Localização",
- "lang_contentOf":"Conteúdo de \"",
- "lang_serverConfiguration":"Configuração do servidor",
- "lang_login":"Entrar",
- "lang_createUser":"Criar Usuário"
-}
+{"lang_unknwonTaskManager":"Erro desconhecido do Gerenciador de Tarefas","lang_configurationCompilation":"Compilar configura\u00e7\u00e3o","lang_moduleAdd":"Adicionar M\u00f3dulo","lang_adAuthentication":"Autentica\u00e7\u00e3o do Active Directory","lang_adModule":"Este m\u00f3dulo possibilita a aplica\u00e7\u00e3o para os computadores clientes com as contas de usu\u00e1rio de um Active Directory. Dependendo da configura\u00e7\u00e3o, o uso de um diret\u00f3rio de usu\u00e1rio no cliente \u00e9 poss\u00edvel.","lang_authentication":"Autentica\u00e7\u00e3o","lang_generic":"Gen\u00e9rico","lang_addCustomModuleInfo":"Com um m\u00f3dulo estendido, \u00e9 poss\u00edvel adicionar os arquivos para o sistema b\u00e1sico que usa este m\u00f3dulo, por exemplo, para usar arquivos de configura\u00e7\u00e3o espec\u00edficas, que n\u00e3o podem ser criados com um dos outros assistentes. Adicionar um m\u00f3dulo estendido normalmente exige pelo menos um conhecimento b\u00e1sico do sistema Linux.","lang_days":"Dia(s)aaaaaaa","lang_hours":"Hora(s)","lang_specificLogo":"Logotipo Espec\u00edfico da Institui\u00e7\u00e3o","lang_institutionLogo":"Logotipo da Institui\u00e7\u00e3o","lang_infoLogo":"Este m\u00f3dulo \u00e9 usado para adicionar o logotipo de uma faculdade \/ universidade, que ent\u00e3o, por exemplo, \u00e9 exibido na tela de login.","lang_location":"Localiza\u00e7\u00e3o","lang_contentOf":"Conte\u00fado de \"","lang_serverConfiguration":"Configura\u00e7\u00e3o do servidor","lang_login":"Entrar","lang_createUser":"Criar Usu\u00e1rio"} \ No newline at end of file
diff --git a/lang/pt/messages.json b/lang/pt/messages.json
index 3eee3f9c..984a4885 100644
--- a/lang/pt/messages.json
+++ b/lang/pt/messages.json
@@ -1,40 +1 @@
-{
- "loginfail": "Nome de usuário ou senha incorreta",
- "token": "Token inválido. Ataque CSRF?",
- "adduser-disabled": "Privilégios insuficientes para adicionar mais usuários",
- "password-mismatch": "Senha e confirmação de senha não são iguais",
- "empty-field": "Um campo não foi preenchido",
- "adduser-success": "Usuário adicionado com sucesso",
- "no-permission": "Não há privilégios suficientes para acessar essa página",
- "settings-updated": "As configurações foram atualizadas",
- "debug-mode": "O modo de depuração está ativo!",
- "value-invalid": "O valor {{1}} é inválido para opção {{0}} e foi ignorado",
- "invalid-action": "Ação inválida: {{0}}",
- "remote-timeout": "Não foi possível baixar o recurso {{0}} ({{1}})",
- "remote-parse-failed": "Análise dos dados recebidos falhou ({{0}})",
- "missing-file": "Não havia nenhum arquivo selecionado!",
- "invalid-file": "O arquivo {{0}} não existe!",
- "upload-complete": "Envio de {{0}} foi bem sucedido",
- "upload-failed": "Envio falhou: {{0}}",
- "config-activated": "Configuração {{0}} foi ativada",
- "config-invalid": "Configuração com id {{0}} não existe",
- "error-write": "Erro ao escrever {{0}}",
- "error-read": "Erro ao ler {{0}}",
- "error-archive": "Arquivo corrompido ou formato não suportado",
- "error-rename": "Não foi possível renomear {{0}} em {{1}}",
- "error-nodir": "O diretório {{0}} não existe.",
- "empty-archive": "O arquivo não contém arquivos ou diretórios",
- "error-extract": "Não foi possível descompactar arquivo {{0}} para {{1}}",
- "module-added": "Módulo adicionado com sucesso",
- "module-deleted": "Módulo {{0}} foi excluído",
- "module-in-use": "Módulo {{0}} ainda é usado pela configuração {{1}}",
- "taskmanager-error": "Falha ao conectar-se ao Gerenciador de Tarefas",
- "taskmanager-format": "Gerenciador de Tarefas retornou dados inválidos",
- "task-error": "Falha na execução: {{0}}",
- "invalid-ip": "Nenhuma interface está configurada com o endereço {{0}}",
- "news-save-success": "Notícia atualizada com sucesso",
- "news-empty": "Não havia notícias no banco de dados",
- "news-del-success": "Notícia excluída",
- "reboot-unconfirmed": "Confirmação para reinicializar não foi confirmada",
- "invalid-template":"Template selecionado não é válido"
-}
+{"loginfail":"Nome de usu\u00e1rio ou senha incorreta","token":"Token inv\u00e1lido. Ataque CSRF?","adduser-disabled":"Privil\u00e9gios insuficientes para adicionar mais usu\u00e1rios","password-mismatch":"Senha e confirma\u00e7\u00e3o de senha n\u00e3o s\u00e3o iguais","empty-field":"Um campo n\u00e3o foi preenchido","adduser-success":"Usu\u00e1rio adicionado com sucesso","no-permission":"N\u00e3o h\u00e1 privil\u00e9gios suficientes para acessar essa p\u00e1gina","settings-updated":"As configura\u00e7\u00f5es foram atualizadas","debug-mode":"O modo de depura\u00e7\u00e3o est\u00e1 ativo!","value-invalid":"O valor {{1}} \u00e9 inv\u00e1lido para op\u00e7\u00e3o {{0}} e foi ignorado","invalid-action":"A\u00e7\u00e3o inv\u00e1lida: {{0}}","remote-timeout":"N\u00e3o foi poss\u00edvel baixar o recurso {{0}} ({{1}})","remote-parse-failed":"An\u00e1lise dos dados recebidos falhou ({{0}})","missing-file":"N\u00e3o havia nenhum arquivo selecionado!","invalid-file":"O arquivo {{0}} n\u00e3o existe!","upload-complete":"Envio de {{0}} foi bem sucedido","upload-failed":"Envio falhou: {{0}}","config-activated":"Configura\u00e7\u00e3o {{0}} foi ativada","config-invalid":"Configura\u00e7\u00e3o com id {{0}} n\u00e3o existe","error-write":"Erro ao escrever {{0}}","error-read":"Erro ao ler {{0}}","error-archive":"Arquivo corrompido ou formato n\u00e3o suportado","error-rename":"N\u00e3o foi poss\u00edvel renomear {{0}} em {{1}}","error-nodir":"O diret\u00f3rio {{0}} n\u00e3o existe.","empty-archive":"O arquivo n\u00e3o cont\u00e9m arquivos ou diret\u00f3rios","error-extract":"N\u00e3o foi poss\u00edvel descompactar arquivo {{0}} para {{1}}","module-added":"M\u00f3dulo adicionado com sucesso","module-deleted":"M\u00f3dulo {{0}} foi exclu\u00eddo","module-in-use":"M\u00f3dulo {{0}} ainda \u00e9 usado pela configura\u00e7\u00e3o {{1}}","taskmanager-error":"Falha ao conectar-se ao Gerenciador de Tarefas","taskmanager-format":"Gerenciador de Tarefas retornou dados inv\u00e1lidos","task-error":"Falha na execu\u00e7\u00e3o: {{0}}","invalid-ip":"Nenhuma interface est\u00e1 configurada com o endere\u00e7o {{0}}","news-save-success":"Not\u00edcia atualizada com sucesso","news-empty":"N\u00e3o havia not\u00edcias no banco de dados","news-del-success":"Not\u00edcia exclu\u00edda","reboot-unconfirmed":"Confirma\u00e7\u00e3o para reinicializar n\u00e3o foi confirmada","invalid-template":"Template selecionado n\u00e3o \u00e9 v\u00e1lido"} \ No newline at end of file
diff --git a/modules/admin.inc.php b/modules/admin.inc.php
index fc352199..1c651109 100644
--- a/modules/admin.inc.php
+++ b/modules/admin.inc.php
@@ -11,6 +11,7 @@ class Page_Admin extends Page
private $table = false;
private $tags = false;
private $unusedTags = false;
+ private $message = false;
protected function doPreprocess()
{
@@ -42,7 +43,9 @@ class Page_Admin extends Page
switch($this->page){
case 'messages':
Render::addTemplate('administration/messages', array(
- 'token' => Session::get('token')
+ 'token' => Session::get('token'),
+ 'msgs' => $this->initMsg(false),
+ 'msgsHC' => $this->initMsg(true)
));
break;
case 'templates':
@@ -120,20 +123,16 @@ class Page_Admin extends Page
}else{
$htmlTemplate = file_get_contents('templates/' . $path . '.html');
$json = Dictionary::getArrayTemplate($path,$lang);
- $htmlCount = substr_count($htmlTemplate, 'lang_');
+ preg_match_all('/{{lang_(.*?)}}/s', $htmlTemplate, $matches);
+ $htmlCount = count(array_unique($matches[1]));
$matchCount = 0;
foreach($json as $key => $value){
- if($key != 'lang' && $value != ''){
- $key = $key . '}}';
- $matchCount += substr_count($htmlTemplate, $key);
- if(substr_count($htmlTemplate, $key) == 0) $matchCount++;
- }
+ if($key != 'lang' && $value != '')
+ $matchCount++;
}
$diff = $htmlCount - $matchCount;
-
- //allright
if($diff == 0) return "OK";
if($diff > 0) return $diff . " JSON tag(s) are missing";
if($diff < 0) return ($diff * -1) . " JSON tag(s) are not being used";
@@ -147,15 +146,33 @@ class Page_Admin extends Page
}
$htmlTemplate = file_get_contents('templates/' . $path . '.html');
preg_match_all('/{{lang_(.*?)}}/s', $htmlTemplate, $matches);
-
$tags = $matches[1];
+ $tags = array_flip($tags);
+ foreach ($tags as $key => $value)
+ {
+ $tags['lang_'.$key] = $value;
+ unset($tags[$key]);
+ }
- foreach($tags as $tag){
+ $langArray = array('en');
+ $json = array();
+ foreach($langArray as $lang){
+ $jsonTags = Dictionary::getArrayTemplate($path,$lang);
+ $json = array_merge($json,$jsonTags);
+ }
+
+
+ unset($json['lang']);
+ $test = array_merge($json,$tags);
+ file_put_contents('test_2.txt',print_r($test,true));
+
+ foreach($test as $tag=>$value){
$this->tags[] = array(
- 'tag' => 'lang_' . $tag,
+ 'tag' => $tag,
'de' => $this->checkJsonTag($path,$tag,'de/'),
'en' => $this->checkJsonTag($path,$tag,'en/'),
- 'pt' => $this->checkJsonTag($path,$tag,'pt/')
+ 'pt' => $this->checkJsonTag($path,$tag,'pt/'),
+ 'class' => $this->checkJsonTags($path,$tag)
);
}
@@ -166,7 +183,21 @@ class Page_Admin extends Page
private function checkJsonTag($path,$tag,$lang){
if($json = Dictionary::getArrayTemplate($path,$lang)){
- return $json['lang_' . $tag];
+ return $json[$tag];
+ }
+ return '';
+ }
+
+ private function checkJsonTags($path,$tag){
+ $htmlTemplate = file_get_contents('templates/' . $path . '.html');
+ $htmlCount = substr_count($htmlTemplate, $tag);
+ if($htmlCount < 1) return "danger";
+
+ $langArray = array('de/','en/','pt/');
+ foreach($langArray as $lang){
+ if($json = Dictionary::getArrayTemplate($path,$lang)){
+ if(!isset($json[$tag]) || $json[$tag] == '') return 'warning';
+ }
}
return '';
}
@@ -180,7 +211,7 @@ class Page_Admin extends Page
);
foreach($_REQUEST as $key => $value){
- $str = explode('-',$key);
+ $str = explode('#',$key);
$pre = $str[0];
$lang = $str[1];
$tag = $str[2];
@@ -195,9 +226,31 @@ class Page_Admin extends Page
foreach($json as $key => $array){
$path = 'lang/' . $key . '/' . $_POST['path'] . '.json';
$json = json_encode($array,true);
- if(!file_put_contents($path,$json))
- $this->message = "fail";
+ if(!file_put_contents($path,$json)){
+ Message::addError('invalid-template');
+ return false;
+ }
+ }
+ }
+
+ private function initMsg($isHardcoded){
+ $msgs = array();
+ $path = 'messages';
+ if($isHardcoded){
+ $path = 'messages-hardcoded';
+ }
+ $json = Dictionary::getArrayTemplate($path,$lang);
+ foreach($json as $key => $array){
+ if($key != 'lang')
+ $msgs[] = array(
+ 'tag' => $key,
+ 'de' => $this->checkJsonTag($path,$key,'de/'),
+ 'en' => $this->checkJsonTag($path,$key,'en/'),
+ 'pt' => $this->checkJsonTag($path,$key,'pt/')
+ );
}
+
+ return $msgs;
}
}
diff --git a/templates/administration/messages.html b/templates/administration/messages.html
index 76d2d1e0..657dba9e 100644
--- a/templates/administration/messages.html
+++ b/templates/administration/messages.html
@@ -5,68 +5,78 @@
</div>
<div class="panel-body">
<p>{{lang_templateMessagesHelp}}
- <form action="?do=Admin" method="post">
</div>
- <table class="table table-hover">
- <thead>
- <tr>
- <th>{{lang_messages}}</th>
- <th style='text-align:center;'>{{lang_germanJSON}}</th>
- <th style='text-align:center;'>{{lang_englishJSON}}</th>
- <th style='text-align:center;'>{{lang_portugueseJSON}}</th>
- </tr>
- </thead>
- <tbody>
- {{#msgs}}
+ <form action="?do=Admin" method="post">
+ <table class="table table-hover">
+ <thead>
<tr>
- <td>{{tag}}</td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang-de-{{tag}}">
- </td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang-en-{{tag}}">
- </td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang-pt-{{tag}}">
- </td>
+ <th>{{lang_messages}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_germanJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_englishJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_portugueseJSON}}</th>
</tr>
- {{/msgs}}
- </tbody>
- </table>
- <table class="table table-hover">
- <thead>
- <tr>
- <th>{{lang_messagesHardcoded}}</th>
- <th style='text-align:center;'>{{lang_germanJSON}}</th>
- <th style='text-align:center;'>{{lang_englishJSON}}</th>
- <th style='text-align:center;'>{{lang_portugueseJSON}}</th>
- </tr>
- </thead>
- <tbody>
- {{#msgsHC}}
+ </thead>
+ <tbody>
+ {{#msgs}}
+ <tr>
+ <td>{{tag}}</td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang#pt#{{tag}}">
+ </td>
+ </tr>
+ {{/msgs}}
+ </tbody>
+ </table>
+ <div class="panel-body">
+ <a class="btn btn-primary" href='?do=Admin' >{{lang_back}}</a>
+ <a class="btn btn-primary" href='?do=Admin' >{{lang_newTag}}</a>
+ <input type="hidden" name="update" value="true">
+ <input type="hidden" name="path" value="messages">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="submit" class="btn btn-primary" value="{{lang_update}}">
+ </form>
+ </div>
+ <form action="?do=Admin" method="post">
+ <table class="table table-hover">
+ <thead>
<tr>
- <td>{{tag}}</td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang-de-{{tag}}">
- </td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang-en-{{tag}}">
- </td>
- <td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang-pt-{{tag}}">
- </td>
+ <th>{{lang_messagesHardcoded}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_germanJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_englishJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_portugueseJSON}}</th>
</tr>
- {{/msgsHC}}
- </tbody>
- </table>
- <div class="panel-body">
- <a class="btn btn-primary" href='?do=Admin' >{{lang_back}}</a>
- <a class="btn btn-primary" href='?do=Admin' >{{lang_newTag}}</a>
- <input type="hidden" name="update" value="true">
- <input type="hidden" name="path" value="{{path}}">
- <input type="hidden" name="token" value="{{token}}">
- <input type="submit" class="btn btn-primary" value="{{lang_update}}">
- </form>
- </div>
+ </thead>
+ <tbody>
+ {{#msgsHC}}
+ <tr>
+ <td>{{tag}}</td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang#pt#{{tag}}">
+ </td>
+ </tr>
+ {{/msgsHC}}
+ </tbody>
+ </table>
+ <div class="panel-body">
+ <a class="btn btn-primary" href='?do=Admin' >{{lang_back}}</a>
+ <a class="btn btn-primary" href='?do=Admin' >{{lang_newTag}}</a>
+ <input type="hidden" name="update" value="true">
+ <input type="hidden" name="path" value="messages-hardcoded">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="submit" class="btn btn-primary" value="{{lang_update}}">
+ </form>
+ </div>
</div>
</div>
diff --git a/templates/administration/template.html b/templates/administration/template.html
index 1ff2e23a..fd357b3d 100644
--- a/templates/administration/template.html
+++ b/templates/administration/template.html
@@ -17,16 +17,16 @@
</thead>
<tbody>
{{#tags}}
- <tr>
+ <tr class="{{class}}">
<td>{{tag}}</td>
<td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang-de-{{tag}}">
+ <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
</td>
<td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang-en-{{tag}}">
+ <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
</td>
<td style='width:250px;text-align:center;'>
- <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang-pt-{{tag}}">
+ <input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang#pt#{{tag}}">
</td>
</tr>
{{/tags}}