From 9fbf64563a7565fe83d9fa1b49de176e585f4751 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Fri, 7 Apr 2017 18:37:17 +0200 Subject: [PATCH] Refactor translations into separate files --- adduser.php | 2 +- admin.js | 8 +- api_gmaps.js | 18 +-- api_openlayers.js | 18 +-- auth.php | 14 +-- download.php | 32 ++--- index.php | 77 ++++-------- lang.php | 302 +++------------------------------------------- lang/de.php | 55 +++++++++ lang/en.php | 68 +++++++++++ lang/fr.php | 62 ++++++++++ lang/hu.php | 55 +++++++++ lang/it.php | 61 ++++++++++ lang/pl.php | 67 ++++++++++ main.js | 12 +- pass.js | 8 +- 16 files changed, 466 insertions(+), 393 deletions(-) create mode 100644 lang/de.php create mode 100644 lang/en.php create mode 100644 lang/fr.php create mode 100644 lang/hu.php create mode 100644 lang/it.php create mode 100644 lang/pl.php diff --git a/adduser.php b/adduser.php index 299e404..d0df146 100644 --- a/adduser.php +++ b/adduser.php @@ -46,7 +46,7 @@ if ($user->isAdmin && !empty($login) && !empty($hash)) { $newUser = new uUser($login); if ($newUser->isValid) { - exitWithStatus(true, $lang_userexists); + exitWithStatus(true, $lang["userexists"]); } if ($newUser->add($login, $hash) === false) { exitWithStatus(true, $mysqli->error); diff --git a/admin.js b/admin.js index 7ece0e0..0434915 100644 --- a/admin.js +++ b/admin.js @@ -18,10 +18,10 @@ function addUser() { var form = '
'; - form += ''; - form += ''; - form += ''; - form += '
'; + form += ''; + form += ''; + form += ''; + form += '
'; form += '
'; showModal(form); } diff --git a/api_gmaps.js b/api_gmaps.js index b20ae50..675ba68 100755 --- a/api_gmaps.js +++ b/api_gmaps.js @@ -126,20 +126,20 @@ function setMarker(p,i,posLen) { else { marker.setIcon('//maps.gstatic.com/mapfiles/ridefinder-images/mm_20_gray.png') } // popup var content = '