Add translated strings to admin pages
This commit is contained in:
parent
720f191701
commit
4fbfe7b585
@ -57,7 +57,7 @@
|
||||
}
|
||||
$query->store_result();
|
||||
if ($query->num_rows) {
|
||||
exitWithStatus(true, "User exists");
|
||||
exitWithStatus(true, $lang_userexists);
|
||||
}
|
||||
$query->free_result();
|
||||
$query->close();
|
||||
|
8
admin.js
8
admin.js
@ -32,10 +32,10 @@ function removeModal() {
|
||||
|
||||
function addUser() {
|
||||
var form = '<form id="userForm" method="post" onsubmit="submitUser(); return false">';
|
||||
form += '<label><b>User name</b></label><input type="text" placeholder="Enter user login" name="login" required>';
|
||||
form += '<label><b>Password</b></label><input type="password" placeholder="Enter Password" name="pass" required>';
|
||||
form += '<label><b>Repeat password</b></label><input type="password" placeholder="Enter Password" name="pass2" required>';
|
||||
form += '<button type="button" onclick="removeModal()">Cancel</button><button type="submit">Submit</button>';
|
||||
form += '<label><b>' + lang_username + '</b></label><input type="text" placeholder="' + lang_usernameenter + '" name="login" required>';
|
||||
form += '<label><b>' + lang_password + '</b></label><input type="password" placeholder="' + lang_passwordenter + '" name="pass" required>';
|
||||
form += '<label><b>' + lang_passwordrepeat + '</b></label><input type="password" placeholder="' + lang_passwordenter + '" name="pass2" required>';
|
||||
form += '<button type="button" onclick="removeModal()">' + lang_cancel + '</button><button type="submit">' + lang_submit + '</button>';
|
||||
form += '</form>';
|
||||
showModal(form);
|
||||
}
|
||||
|
@ -164,6 +164,13 @@ print
|
||||
var lang_latest = "'.$lang_latest.'";
|
||||
var lang_track = "'.$lang_track.'";
|
||||
var lang_newinterval = "'.$lang_newinterval.'";
|
||||
var lang_username = "'.$lang_username.'";
|
||||
var lang_password = "'.$lang_password.'";
|
||||
var lang_passwordrepeat = "'.$lang_passwordrepeat.'";
|
||||
var lang_passwordenter = "'.$lang_passwordenter.'";
|
||||
var lang_usernameenter = "'.$lang_usernameenter.'";
|
||||
var lang_cancel = "'.$lang_cancel.'";
|
||||
var lang_submit = "'.$lang_submit.'";
|
||||
var units = "'.$units.'";
|
||||
var mapapi = "'.$mapapi.'";
|
||||
var gkey = '.(isset($gkey)?'"'.$gkey.'"':'null').';
|
||||
|
31
lang.php
31
lang.php
@ -54,8 +54,13 @@ switch($lang) {
|
||||
$lang_metric = "Metric";
|
||||
$lang_imperial = "Imperial/US";
|
||||
$lang_adminmenu = "Administration";
|
||||
$lang_passwordrepeat = "Repeat password";
|
||||
$lang_passwordenter = "Enter password";
|
||||
$lang_usernameenter = "Enter username";
|
||||
$lang_adduser = "Add user";
|
||||
$lang_userexists = "User exists";
|
||||
$lang_cancel ="Cancel";
|
||||
$lang_submit = "Submit";
|
||||
break;
|
||||
|
||||
case "pl":
|
||||
@ -93,8 +98,13 @@ switch($lang) {
|
||||
$lang_metric = "Metryczne";
|
||||
$lang_imperial = "Anglosaskie";
|
||||
$lang_adminmenu = "Administracja";
|
||||
$lang_passwordrepeat = "Powtórz hasło";
|
||||
$lang_passwordenter = "Podaj hasło";
|
||||
$lang_usernameenter = "Podaj użytkownika";
|
||||
$lang_adduser = "Dodaj użytkownika";
|
||||
$lang_userexists = "Użytkownik istnieje";
|
||||
$lang_cancel ="Anuluj";
|
||||
$lang_submit = "Zatwierdź";
|
||||
break;
|
||||
|
||||
case "de":
|
||||
@ -132,10 +142,13 @@ switch($lang) {
|
||||
$lang_metric = "Metrisches";
|
||||
$lang_imperial = "Angloamerikanisches";
|
||||
$lang_adminmenu = "Verwaltung";
|
||||
|
||||
// todo: translate
|
||||
$lang_adduser = "Add user";
|
||||
$lang_userexists = "User exists";
|
||||
$lang_passwordrepeat = "Repeat password"; // todo: translate
|
||||
$lang_passwordenter = "Enter password"; // todo: translate
|
||||
$lang_usernameenter = "Enter username"; // todo: translate
|
||||
$lang_adduser = "Add user"; // todo: translate
|
||||
$lang_userexists = "User exists"; // todo: translate
|
||||
$lang_cancel ="Cancel"; // todo: translate
|
||||
$lang_submit = "Submit"; // todo: translate
|
||||
break;
|
||||
|
||||
case "hu":
|
||||
@ -173,9 +186,13 @@ switch($lang) {
|
||||
$lang_metric = "Metrikus";
|
||||
$lang_imperial = "Imperal/US";
|
||||
$lang_adminmenu = "Adminisztráció";
|
||||
// todo: translate
|
||||
$lang_adduser = "Add user";
|
||||
$lang_userexists = "User exists";
|
||||
$lang_passwordrepeat = "Repeat password"; // todo: translate
|
||||
$lang_passwordenter = "Enter password"; // todo: translate
|
||||
$lang_usernameenter = "Enter username"; // todo: translate
|
||||
$lang_adduser = "Add user"; // todo: translate
|
||||
$lang_userexists = "User exists"; // todo: translate
|
||||
$lang_cancel ="Cancel"; // todo: translate
|
||||
$lang_submit = "Submit"; // todo: translate
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user