Refactor translations into separate files

This commit is contained in:
Bartek Fabiszewski 2017-04-07 18:37:17 +02:00
parent 4a8bdc91b0
commit 9fbf64563a
16 changed files with 466 additions and 393 deletions

View File

@ -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);

View File

@ -18,10 +18,10 @@
function addUser() {
var form = '<form id="userForm" method="post" onsubmit="submitUser(); return false">';
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 += '<div class="buttons"><button type="button" onclick="removeModal()">' + lang_cancel + '</button><button type="submit">' + lang_submit + '</button></div>';
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 += '<div class="buttons"><button type="button" onclick="removeModal()">' + lang['cancel'] + '</button><button type="submit">' + lang['submit'] + '</button></div>';
form += '</form>';
showModal(form);
}

View File

@ -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 = '<div id="popup">'+
'<div id="pheader">'+lang_user+': '+p.username.toUpperCase()+'<br />'+lang_track+': '+p.trackname.toUpperCase()+
'<div id="pheader">'+lang['user']+': '+p.username.toUpperCase()+'<br />'+lang['track']+': '+p.trackname.toUpperCase()+
'</div>'+
'<div id="pbody">'+
((p.comments != null)?'<div id="pcomments">'+p.comments+'</div>':'')+
'<div id="pleft"><b>'+lang_time+':</b> '+p.dateoccured+'<br />'+
((p.speed != null)?'<b>'+lang_speed+':</b> '+(p.speed.toKmH()*factor_kmh)+' '+unit_kmh+'<br />':'')+
((p.altitude != null)?'<b>'+lang_altitude+':</b> '+(p.altitude*factor_m).toFixed()+' '+unit_m+'<br />':'')+
((p.accuracy != null)?'<b>'+lang_accuracy+':</b> '+(p.accuracy*factor_m).toFixed()+' '+unit_m+'<br />':'')+
'<div id="pleft"><b>'+lang['time']+':</b> '+p.dateoccured+'<br />'+
((p.speed != null)?'<b>'+lang['speed']+':</b> '+(p.speed.toKmH()*factor_kmh)+' '+unit_kmh+'<br />':'')+
((p.altitude != null)?'<b>'+lang['altitude']+':</b> '+(p.altitude*factor_m).toFixed()+' '+unit_m+'<br />':'')+
((p.accuracy != null)?'<b>'+lang['accuracy']+':</b> '+(p.accuracy*factor_m).toFixed()+' '+unit_m+'<br />':'')+
'</div>'+
((latest==0)?
('<div id="pright"><b>'+lang_ttime+':</b> '+p.totalSeconds.toHMS()+'<br />'+
'<b>'+lang_aspeed+':</b> '+((p.totalSeconds>0)?((p.totalMeters/p.totalSeconds).toKmH()*factor_kmh).toFixed():0)+' '+unit_kmh+'<br />'+
'<b>'+lang_tdistance+':</b> '+(p.totalMeters.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+'</div>'):'')+
'<div id="pfooter">'+lang_point+' '+(i+1)+' '+lang_of+' '+(posLen)+'</div>'+
('<div id="pright"><b>'+lang['ttime']+':</b> '+p.totalSeconds.toHMS()+'<br />'+
'<b>'+lang['aspeed']+':</b> '+((p.totalSeconds>0)?((p.totalMeters/p.totalSeconds).toKmH()*factor_kmh).toFixed():0)+' '+unit_kmh+'<br />'+
'<b>'+lang['tdistance']+':</b> '+(p.totalMeters.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+'</div>'):'')+
'<div id="pfooter">'+lang['point']+' '+(i+1)+' '+lang['of']+' '+(posLen)+'</div>'+
'</div></div>';
popup = new google.maps.InfoWindow();
popup.listener = google.maps.event.addListener(marker, 'click', (function(marker,content) {

View File

@ -161,20 +161,20 @@ function setMarker(p,i,posLen) {
// popup
var content = '<div id="popup">'+
'<div id="pheader">'+lang_user+': '+p.username.toUpperCase()+'<br />'+lang_track+': '+p.trackname.toUpperCase()+
'<div id="pheader">'+lang['user']+': '+p.username.toUpperCase()+'<br />'+lang['track']+': '+p.trackname.toUpperCase()+
'</div>'+
'<div id="pbody">'+
((p.comments != null)?'<div id="pcomments">'+p.comments+'</div>':'')+
'<div id="pleft"><b>'+lang_time+':</b> '+p.dateoccured+'<br />'+
((p.speed != null)?'<b>'+lang_speed+':</b> '+(p.speed.toKmH()*factor_kmh)+' '+unit_kmh+'<br />':'')+
((p.altitude != null)?'<b>'+lang_altitude+':</b> '+(p.altitude*factor_m).toFixed()+' '+unit_m+'<br />':'')+
((p.accuracy != null)?'<b>'+lang_accuracy+':</b> '+(p.accuracy*factor_m).toFixed()+' '+unit_m+'<br />':'')+
'<div id="pleft"><b>'+lang['time']+':</b> '+p.dateoccured+'<br />'+
((p.speed != null)?'<b>'+lang['speed']+':</b> '+(p.speed.toKmH()*factor_kmh)+' '+unit_kmh+'<br />':'')+
((p.altitude != null)?'<b>'+lang['altitude']+':</b> '+(p.altitude*factor_m).toFixed()+' '+unit_m+'<br />':'')+
((p.accuracy != null)?'<b>'+lang['accuracy']+':</b> '+(p.accuracy*factor_m).toFixed()+' '+unit_m+'<br />':'')+
'</div>'+
((latest==0)?
('<div id="pright"><b>'+lang_ttime+':</b> '+p.totalSeconds.toHMS()+'<br />'+
'<b>'+lang_aspeed+':</b> '+((p.totalSeconds>0)?((p.totalMeters/p.totalSeconds).toKmH()*factor_kmh).toFixed():0)+' '+unit_kmh+'<br />'+
'<b>'+lang_tdistance+':</b> '+(p.totalMeters.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+'</div>'):'')+
'<div id="pfooter">'+lang_point+' '+(i+1)+' '+lang_of+' '+(posLen)+'</div>'+
('<div id="pright"><b>'+lang['ttime']+':</b> '+p.totalSeconds.toHMS()+'<br />'+
'<b>'+lang['aspeed']+':</b> '+((p.totalSeconds>0)?((p.totalMeters/p.totalSeconds).toKmH()*factor_kmh).toFixed():0)+' '+unit_kmh+'<br />'+
'<b>'+lang['tdistance']+':</b> '+(p.totalMeters.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+'</div>'):'')+
'<div id="pfooter">'+lang['point']+' '+(i+1)+' '+lang['of']+' '+(posLen)+'</div>'+
'</div></div>';
marker.events.register("mousedown", marker, (function() {
return function() {

View File

@ -54,7 +54,7 @@ if (!$user->isValid && ($config::$require_authentication || defined('headless'))
'<!DOCTYPE html>
<html>
<head>
<title>'.$lang_title.'</title>
<title>'.$lang["title"].'</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="main.css">
@ -66,18 +66,18 @@ if (!$user->isValid && ($config::$require_authentication || defined('headless'))
</head>
<body onload="focus()">
<div id="login">
<div id="title">'.$lang_title.'</div>
<div id="subtitle">'.$lang_private.'</div>
<div id="title">'.$lang["title"].'</div>
<div id="subtitle">'.$lang["private"].'</div>
<form action="index.php" method="post">
'.$lang_username.':<br />
'.$lang["username"].':<br />
<input type="text" name="user"><br />
'.$lang_password.':<br />
'.$lang["password"].':<br />
<input type="password" name="pass"><br />
<br />
<input type="submit" value="'.$lang_login.'">
<input type="submit" value="'.$lang["login"].'">
'.(($force_login==1) ? "<input type=\"hidden\" name=\"force_login\" value=\"1\">" : "").'
</form>
<div id="error">'.(($auth_error==1) ? $lang_authfail : "").'</div>
<div id="error">'.(($auth_error==1) ? $lang["authfail"] : "").'</div>
</div>
</body>
</html>';

View File

@ -110,16 +110,16 @@ if ($trackId && $userId) {
$xml->writeAttribute("id", $position->id);
$description =
"<div style=\"font-weight: bolder;padding-bottom: 10px;border-bottom: 1px solid gray;\">".
$lang_user.": ".strtoupper($position->userLogin)."<br />".$lang_track.": ".strtoupper($position->trackName).
$lang["user"].": ".strtoupper($position->userLogin)."<br />".$lang["track"].": ".strtoupper($position->trackName).
"</div>".
"<div>".
"<div style=\"padding-top: 10px;\"><b>".$lang_time.":</b> ".$position->time."<br />".
(!is_null($position->speed) ? "<b>".$lang_speed.":</b> ".round($position->speed * 3.6 * $factor_kmh, 2)." ".$unit_kmh."<br />" : "").
(!is_null($position->altitude) ? "<b>".$lang_altitude.":</b> ".round($position->altitude * $factor_m)." ".$unit_m."<br />" : "").
"<b>".$lang_ttime.":</b> ".toHMS($totalSeconds)."<br />".
"<b>".$lang_aspeed.":</b> ".(($totalSeconds != 0) ? round($totalMeters / $totalSeconds * 3.6 * $factor_kmh, 2) : 0)." ".$unit_kmh."<br />".
"<b>".$lang_tdistance.":</b> ".round($totalMeters / 1000 * $factor_km, 2)." ".$unit_km."<br />"."</div>".
"<div style=\"font-size: smaller;padding-top: 10px;\">".$lang_point." ".$i." ".$lang_of." ".count($positionsArr)."</div>".
"<div style=\"padding-top: 10px;\"><b>".$lang["time"].":</b> ".$position->time."<br />".
(!is_null($position->speed) ? "<b>".$lang["speed"].":</b> ".round($position->speed * 3.6 * $factor_kmh, 2)." ".$unit_kmh."<br />" : "").
(!is_null($position->altitude) ? "<b>".$lang["altitude"].":</b> ".round($position->altitude * $factor_m)." ".$unit_m."<br />" : "").
"<b>".$lang["ttime"].":</b> ".toHMS($totalSeconds)."<br />".
"<b>".$lang["aspeed"].":</b> ".(($totalSeconds != 0) ? round($totalMeters / $totalSeconds * 3.6 * $factor_kmh, 2) : 0)." ".$unit_kmh."<br />".
"<b>".$lang["tdistance"].":</b> ".round($totalMeters / 1000 * $factor_km, 2)." ".$unit_km."<br />"."</div>".
"<div style=\"font-size: smaller;padding-top: 10px;\">".$lang["point"]." ".$i." ".$lang["of"]." ".count($positionsArr)."</div>".
"</div>";
$xml->startElement("description");
$xml->writeCData($description);
@ -184,14 +184,14 @@ if ($trackId && $userId) {
$xml->writeElement("name", ++$i);
$xml->startElement("desc");
$description =
$lang_user.": ".strtoupper($position->userLogin)." ".$lang_track.": ".strtoupper($position->trackName).
" ".$lang_time.": ".$position->time.
(!is_null($position->speed) ? " ".$lang_speed.": ".round($position->speed * 3.6 * $factor_kmh, 2)." ".$unit_kmh : "").
(!is_null($position->altitude) ? " ".$lang_altitude.": ".round($position->altitude * $factor_m)." ".$unit_m : "").
" ".$lang_ttime.": ".toHMS($totalSeconds)."".
" ".$lang_aspeed.": ".(($totalSeconds != 0) ? round($totalMeters / $totalSeconds * 3.6 * $factor_kmh, 2) : 0)." ".$unit_kmh.
" ".$lang_tdistance.": ".round($totalMeters / 1000 * $factor_km, 2)." ".$unit_km.
" ".$lang_point." ".$i." ".$lang_of." ".count($positionsArr);
$lang["user"].": ".strtoupper($position->userLogin)." ".$lang["track"].": ".strtoupper($position->trackName).
" ".$lang["time"].": ".$position->time.
(!is_null($position->speed) ? " ".$lang["speed"].": ".round($position->speed * 3.6 * $factor_kmh, 2)." ".$unit_kmh : "").
(!is_null($position->altitude) ? " ".$lang["altitude"].": ".round($position->altitude * $factor_m)." ".$unit_m : "").
" ".$lang["ttime"].": ".toHMS($totalSeconds)."".
" ".$lang["aspeed"].": ".(($totalSeconds != 0) ? round($totalMeters / $totalSeconds * 3.6 * $factor_kmh, 2) : 0)." ".$unit_kmh.
" ".$lang["tdistance"].": ".round($totalMeters / 1000 * $factor_km, 2)." ".$unit_km.
" ".$lang["point"]." ".$i." ".$lang["of"]." ".count($positionsArr);
$xml->writeCData($description);
$xml->endElement();
$xml->endElement();

View File

@ -22,8 +22,8 @@ require_once("helpers/position.php");
require_once("helpers/track.php");
if ($user->isValid) {
$itemPass = '<a href="javascript:void(0)" onclick="changePass()">' . $lang_changepass . '</a>';
$itemLogout = '<a href="logout.php">' . $lang_logout . '</a>';
$itemPass = '<a href="javascript:void(0)" onclick="changePass()">' . $lang["changepass"] . '</a>';
$itemLogout = '<a href="logout.php">' . $lang["logout"] . '</a>';
$userHeader = '
<div id="user_menu">
<a href="javascript:void(0);" onclick="userMenu()">' . $user->login . '</a>
@ -33,7 +33,7 @@ if ($user->isValid) {
</div>
</div>';
} else {
$userHeader = '<a href="index.php?force_login=1">' . $lang_login . '</a>';
$userHeader = '<a href="index.php?force_login=1">' . $lang["login"] . '</a>';
}
$lastUserId = NULL;
$userForm = '';
@ -41,11 +41,11 @@ if ($user->isAdmin || $config::$public_tracks) {
// public access or admin user
// prepare user select form
$userForm = '
<br /><u>' . $lang_user . '</u>
<br /><u>' . $lang["user"] . '</u>
<br />
<form>
<select name="user" onchange="selectUser(this)">
<option value="0">' . $lang_suser . '</option>';
<option value="0">' . $lang["suser"] . '</option>';
// get last position user
$lastPosition = new uPosition();
$lastPosition->getLast();
@ -66,7 +66,7 @@ if ($user->isAdmin || $config::$public_tracks) {
}
// prepare track select form
$trackForm = '
<u>' . $lang_track . '</u><br />
<u>' . $lang["track"] . '</u><br />
<form>
<select name="track" onchange="selectTrack(this)">';
$displayId = NULL;
@ -89,12 +89,12 @@ if (!empty($tracksArr)) {
}
$trackForm.= '
</select>
<input id="latest" type="checkbox" onchange="toggleLatest();"> ' . $lang_latest . '<br />
<input id="latest" type="checkbox" onchange="toggleLatest();"> ' . $lang["latest"] . '<br />
</form>
';
// map api select form
$apiForm = '
<u>' . $lang_api . '</u><br />
<u>' . $lang["api"] . '</u><br />
<form>
<select name="api" onchange="loadMapAPI(this.options[this.selectedIndex].value);">
<option value="gmaps"' . (($config::$mapapi == "gmaps") ? ' selected' : '') . '>Google Maps</option>
@ -104,25 +104,23 @@ $apiForm = '
';
// language select form
$langForm = '
<u>' . $lang_language . '</u><br />
<u>' . $lang["language"] . '</u><br />
<form>
<select name="units" onchange="setLang(this.options[this.selectedIndex].value);">
<option value="en"' . (($config::$lang == "en") ? ' selected' : '') . '>English</option>
<option value="pl"' . (($config::$lang == "pl") ? ' selected' : '') . '>Polski</option>
<option value="de"' . (($config::$lang == "de") ? ' selected' : '') . '>Deutsch</option>
<option value="hu"' . (($config::$lang == "hu") ? ' selected' : '') . '>Magyar</option>
<option value="fr"' . (($config::$lang == "fr") ? ' selected' : '') . '>Français</option>
<option value="it"' . (($config::$lang == "it") ? ' selected' : '') . '>Italiano</option>
<select name="units" onchange="setLang(this.options[this.selectedIndex].value);">';
foreach ($langsArr as $langCode => $langName) {
$langForm .= '<option value="' . $langCode . '"' . (($config::$lang == $langCode) ? ' selected' : '') . '>' . $langName . '</option>';
}
$langForm .= '
</select>
</form>
';
// units select form
$unitsForm = '
<u>' . $lang_units . '</u><br />
<u>' . $lang["units"] . '</u><br />
<form>
<select name="units" onchange="setUnits(this.options[this.selectedIndex].value);">
<option value="metric"' . (($config::$units == "metric") ? ' selected' : '') . '>' . $lang_metric . '</option>
<option value="imperial"' . (($config::$units == "imperial") ? ' selected' : '') . '>' . $lang_imperial . '</option>
<option value="metric"' . (($config::$units == "metric") ? ' selected' : '') . '>' . $lang["metric"] . '</option>
<option value="imperial"' . (($config::$units == "imperial") ? ' selected' : '') . '>' . $lang["imperial"] . '</option>
</select>
</form>
';
@ -132,8 +130,8 @@ $adminScript = '';
if ($user->isAdmin) {
$adminMenu = '
<div id="admin_menu">
<u>' . $lang_adminmenu . '</u><br />
<a href="javascript:void(0);" onclick="addUser()">' . $lang_adduser . '</a><br />
<u>' . $lang["adminmenu"] . '</u><br />
<a href="javascript:void(0);" onclick="addUser()">' . $lang["adduser"] . '</a><br />
</div>
';
$adminScript = '<script type="text/javascript" src="admin.js"></script>';
@ -141,7 +139,7 @@ if ($user->isAdmin) {
print '<!DOCTYPE html>
<html>
<head>
<title>' . $lang_title . '</title>
<title>' . $lang["title"] . '</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="main.css" />
@ -149,30 +147,6 @@ print '<!DOCTYPE html>
var interval = ' . $config::$interval . ';
var userid = ' . (($displayId) ? $displayId : -1) . ';
var trackid = ' . (($trackId) ? $trackId : -1) . ';
var lang_user = "' . $lang_user . '";
var lang_time = "' . $lang_time . '";
var lang_speed = "' . $lang_speed . '";
var lang_accuracy = "' . $lang_accuracy . '";
var lang_altitude = "' . $lang_altitude . '";
var lang_ttime = "' . $lang_ttime . '";
var lang_aspeed = "' . $lang_aspeed . '";
var lang_tdistance = "' . $lang_tdistance . '";
var lang_point = "' . $lang_point . '";
var lang_of = "' . $lang_of . '";
var lang_summary = "' . $lang_summary . '";
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_oldpassword = "' . $lang_oldpassword . '";
var lang_newpassword = "' . $lang_newpassword . '";
var lang_newpasswordrepeat = "' . $lang_newpasswordrepeat . '";
var lang_cancel = "' . $lang_cancel . '";
var lang_submit = "' . $lang_submit . '";
var units = "' . $config::$units . '";
var mapapi = "' . $config::$mapapi . '";
var gkey = ' . (!empty($config::$gkey) ? '"' . $config::$gkey . '"' : 'null') . ';
@ -182,6 +156,7 @@ print '<!DOCTYPE html>
var layer_ump = "' . $config::$layer_ump . '";
var init_latitude = "' . $config::$init_latitude . '";
var init_longitude = "' . $config::$init_longitude . '";
var lang = ' . json_encode($lang) . ';
</script>
<script type="text/javascript" src="main.js"></script>
';
@ -212,12 +187,12 @@ print '
</div>
<div id="track">
' . $trackForm . '
<input type="checkbox" onchange="autoReload();"> ' . $lang_autoreload . ' (<a href="javascript:void(0);" onclick="setTime()"><span id="auto">' . $config::$interval . '</span></a> s)<br />
<a href="javascript:void(0);" onclick="loadTrack(userid,trackid,0)">' . $lang_reload . '</a><br />
<input type="checkbox" onchange="autoReload();"> ' . $lang["autoreload"] . ' (<a href="javascript:void(0);" onclick="setTime()"><span id="auto">' . $config::$interval . '</span></a> s)<br />
<a href="javascript:void(0);" onclick="loadTrack(userid,trackid,0)">' . $lang["reload"] . '</a><br />
</div>
<div id="summary"></div>
<div id="other">
<a href="javascript:void(0);" onclick="toggleChart();">' . $lang_chart . '</a>
<a href="javascript:void(0);" onclick="toggleChart();">' . $lang["chart"] . '</a>
</div>
<div id="api">
' . $apiForm . '
@ -229,7 +204,7 @@ print '
' . $unitsForm . '
</div>
<div id="export">
<u>' . $lang_download . '</u><br />
<u>' . $lang["download"] . '</u><br />
<a href="javascript:void(0);" onclick="load(\'kml\',userid,trackid)">kml</a><br />
<a href="javascript:void(0);" onclick="load(\'gpx\',userid,trackid)">gpx</a><br />
</div>
@ -242,7 +217,7 @@ print '
<div id="map-canvas"></div>
<div id="bottom">
<div id="chart"></div>
<div id="close"><a href="javascript:void(0);" onclick="toggleChart(0);">' . $lang_close . '</a></div>
<div id="close"><a href="javascript:void(0);" onclick="toggleChart(0);">' . $lang["close"] . '</a></div>
</div>
</div>
</body>

302
lang.php
View File

@ -17,293 +17,23 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
switch($config::$lang) {
default:
case "en":
$lang_title = "• μlogger •";
$lang_private = "You need login and password to access this page.";
$lang_authfail = "Wrong username or password";
$lang_user = "User";
$lang_track = "Track";
$lang_latest = "latest position";
$lang_autoreload = "autoreload";
$lang_reload = "Reload now";
$lang_download = "Download data";
$lang_chart = "Altitudes chart";
$lang_close = "close";
$lang_time = "Time";
$lang_speed = "Speed";
$lang_accuracy = "Accuracy";
$lang_altitude = "Altitude";
$lang_ttime = "Total time";
$lang_aspeed = "Average speed";
$lang_tdistance = "Total dist.";
$lang_point = "Point"; //Point x of y
$lang_of = "of";
$lang_summary = "Trip summary";
$lang_suser = "select user";
$lang_logout = "log out";
$lang_login = "Log in";
$lang_username = "Username";
$lang_password = "Password";
$lang_language = "Language";
$lang_newinterval = "Enter new interval value (seconds)";
$lang_api = "Map API";
$lang_language = "Language";
$lang_units = "Units";
$lang_metric = "Metric";
$lang_imperial = "Imperial/US";
$lang_adminmenu = "Administration";
$lang_passwordrepeat = "Repeat password";
$lang_passwordenter = "Enter password";
$lang_usernameenter = "Enter username";
$lang_oldpassword = "Old password";
$lang_newpassword = "New password";
$lang_newpasswordrepeat = "Repeat new password";
$lang_changepass = "Change password";
$lang_adduser = "Add user";
$lang_userexists = "User exists";
$lang_cancel ="Cancel";
$lang_submit = "Submit";
break;
// available languages
$langsArr = [
"en" => "English",
"pl" => "Polski",
"de" => "Deutsch",
"hu" => "Magyar",
"fr" => "Français",
"it" => "Italiano"
];
case "it":
$lang_title = "• μlogger •";
$lang_private = "Devi accedere per visualizzare questa pagina.";
$lang_authfail = "Nome utente o password errati.";
$lang_user = "Utente";
$lang_track = "Traccia";
$lang_latest = "ultima posizione";
$lang_autoreload = "auto-ricarica";
$lang_reload = "Ricaria ora";
$lang_download = "Scarica dati";
$lang_chart = "Grafico altitudine";
$lang_close = "chiudi";
$lang_time = "Ora";
$lang_speed = "Velocità";
$lang_accuracy = "Precisione";
$lang_altitude = "Altitudine";
$lang_ttime = "Tempo totale";
$lang_aspeed = "Velocità media";
$lang_tdistance = "Distanza totale";
$lang_point = "Punto"; //Point x of y
$lang_of = "di";
$lang_summary = "Sommario";
$lang_suser = "scegli utente";
$lang_logout = "esci";
$lang_login = "Entra";
$lang_username = "Nome Utente";
$lang_password = "Password";
$lang_language = "Lingua";
$lang_newinterval = "Immetti nuovo intervallo (secondi)";
$lang_api = "API Mappe";
$lang_units = "Unità";
$lang_metric = "Metriche";
$lang_imperial = "Imperiali";
$lang_adminmenu = "Amministazione";
$lang_passwordrepeat = "Ripeti password";
$lang_passwordenter = "Immetti password";
$lang_usernameenter = "Immetti nome utente";
$lang_oldpassword = "Old password"; // todo: translate
$lang_newpassword = "New password"; // todo: translate
$lang_newpasswordrepeat = "Repeat new password"; // todo: translate
$lang_changepass = "Change password"; // todo: translate
$lang_adduser = "Aggiungi utente";
$lang_userexists = "L'utente esiste già";
$lang_cancel ="Annulla";
$lang_submit = "Invia";
break;
// always load en base
require_once("lang/en.php");
case "pl":
$lang_title = "• μlogger •";
$lang_private = "Aby się zalogować musisz podać login i hasło";
$lang_authfail = "błędny login lub hasło";
$lang_user = "Użytkownik";
$lang_track = "Trasa";
$lang_latest = "ostatnia pozycja";
$lang_autoreload = "odświeżaj";
$lang_reload = "Odśwież teraz";
$lang_download = "Pobierz dane";
$lang_chart = "Wykres przewyższeń";
$lang_close = "zamknij";
$lang_time = "Czas";
$lang_speed = "Prędkość";
$lang_accuracy = "Doładność";
$lang_altitude = "Wysokość";
$lang_ttime = "Czas podróży";
$lang_aspeed = "Średnia prędkość";
$lang_tdistance = "Odległość";
$lang_suser = "wybierz login";
$lang_point = "Punkt";
$lang_of = "z";
$lang_summary = "Podsumowanie";
$lang_logout = "wyloguj";
$lang_login = "zaloguj";
$lang_username = "Login";
$lang_password = "Hasło";
$lang_language = "Język";
$lang_newinterval = "Podaj częstotliwość odświeżania (w sekundach)";
$lang_api = "Map API";
$lang_language = "Język";
$lang_units = "Jednostki";
$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_oldpassword = "Obecne hasło";
$lang_newpassword = "Nowe hasło";
$lang_newpasswordrepeat = "Powtórz nowe hasło";
$lang_changepass = "Zmień hasło";
$lang_adduser = "Dodaj użytkownika";
$lang_userexists = "Użytkownik istnieje";
$lang_cancel ="Anuluj";
$lang_submit = "Zatwierdź";
break;
case "de":
$lang_title = "• μlogger •";
$lang_private = "Sie müssen Benutzernamen und Kennwort eingeben, um auf diese Seite zuzugreifen.";
$lang_authfail = "Falscher Benutzername oder Passwort";
$lang_user = "Benutzer";
$lang_track = "Route";
$lang_latest = "letzte Position";
$lang_autoreload = "Autoneuladen";
$lang_reload = "Neuladen";
$lang_download = "Download Daten";
$lang_chart = "Höhentabelle";
$lang_close = "Schließen";
$lang_time = "Zeit";
$lang_speed = "Geschwindigkeit";
$lang_accuracy = "Genauigkeit";
$lang_altitude = "Höhe";
$lang_ttime = "Gesamte Zeit";
$lang_aspeed = "Durchschnittstempo";
$lang_tdistance = "Gesamt Entfernung";
$lang_point = "Punkt"; //Punkt x von y
$lang_of = "von";
$lang_summary = "Streckenzusammenfassung";
$lang_suser = "Wähle Benutzer";
$lang_logout = "Abmelden";
$lang_login = "Anmelden";
$lang_username = "Benutzername";
$lang_password = "Passwort";
$lang_language = "Sprache";
$lang_newinterval = "Neuen Intervall-Wert eingeben (in Sekunden)";
$lang_api = "Karten API";
$lang_language = "Sprache";
$lang_units = "Maßsystem";
$lang_metric = "Metrisches";
$lang_imperial = "Angloamerikanisches";
$lang_adminmenu = "Verwaltung";
$lang_passwordrepeat = "Repeat password"; // todo: translate
$lang_passwordenter = "Enter password"; // todo: translate
$lang_usernameenter = "Enter username"; // todo: translate
$lang_oldpassword = "Old password"; // todo: translate
$lang_newpassword = "New password"; // todo: translate
$lang_newpasswordrepeat = "Repeat new password"; // todo: translate
$lang_changepass = "Change password"; // 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":
$lang_title = "• μlogger •";
$lang_private = "Felhasználónév és jelszó szükséges a belépéshez";
$lang_authfail = "Hibás név vagy jelszó";
$lang_user = "Felhasználó";
$lang_track = "Útvonal";
$lang_latest = "Utolsó rögzített pont";
$lang_autoreload = "Automatikus frissítés";
$lang_reload = "Frissítés most";
$lang_download = "Adatok letöltése";
$lang_chart = "Magasság diagramm";
$lang_close = "Bezár";
$lang_time = "Rögzítés ideje";
$lang_speed = "Sebesség";
$lang_accuracy = "Pontosság";
$lang_altitude = "Magasság";
$lang_ttime = "Menetidő";
$lang_aspeed = "Átlagsebesség";
$lang_tdistance = "Megtett út";
$lang_suser = "Felhasználónév";
$lang_point = "Rögzített pontok száma";
$lang_of = "/";
$lang_summary = "Utazás adatai";
$lang_logout = "Kilépés";
$lang_login = "Belépés";
$lang_username = "Felhasználó";
$lang_password = "Jelszó";
$lang_language = "Nyelv";
$lang_newinterval = "Automatikus frissítés ideje (másodpercben)";
$lang_api = "Map API";
$lang_language = "Nyelv";
$lang_units = "Mértékegység";
$lang_metric = "Metrikus";
$lang_imperial = "Imperal/US";
$lang_adminmenu = "Adminisztráció";
$lang_passwordrepeat = "Repeat password"; // todo: translate
$lang_passwordenter = "Enter password"; // todo: translate
$lang_usernameenter = "Enter username"; // todo: translate
$lang_oldpassword = "Old password"; // todo: translate
$lang_newpassword = "New password"; // todo: translate
$lang_newpasswordrepeat = "Repeat new password"; // todo: translate
$lang_changepass = "Change password"; // 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 "fr":
$lang_title = "• μlogger •";
$lang_private = "Il faut un nom d'utilisateur et un mot de passe pour accéder à cette page.";
$lang_authfail = "Nom d'utilisateur ou mot de passe erroné.";
$lang_user = "Utilisateur";
$lang_track = "Piste";
$lang_latest = "dernière position";
$lang_autoreload = "rechargement automatique";
$lang_reload = "Recharger maintenant";
$lang_download = "Télécharger les données";
$lang_chart = "Courbes d'altitudes";
$lang_close = "fermer";
$lang_time = "Temps";
$lang_speed = "Vitesse";
$lang_accuracy = "Accélération";
$lang_altitude = "Altitude";
$lang_ttime = "Temps total";
$lang_aspeed = "Vitesse moyenne";
$lang_tdistance = "Dist. totale";
$lang_point = "Point"; //Point x of y
$lang_of = "de";
$lang_summary = "Résumé du trajet";
$lang_suser = "Sélectionner un utilisateur";
$lang_logout = "Déconnexion";
$lang_login = "Connexion";
$lang_username = "Nom d'utilisateur";
$lang_password = "Mot de passe";
$lang_language = "Langage";
$lang_newinterval = "Entrez un intervalle (en seconde)";
$lang_api = "API des cartes";
$lang_language = "Langage";
$lang_units = "Unités";
$lang_metric = "Système métrique";
$lang_imperial = "Système anglophone";
$lang_adminmenu = "Administration";
$lang_passwordrepeat = "Répetez le mot de passe";
$lang_passwordenter = "Entrez votre mot de passe";
$lang_usernameenter = "Entrez votre nom d'utilisateur";
$lang_oldpassword = "Old password"; // todo: translate
$lang_newpassword = "New password"; // todo: translate
$lang_newpasswordrepeat = "Repeat new password"; // todo: translate
$lang_changepass = "Change password"; // todo: translate
$lang_adduser = "Ajouter un utilisateur";
$lang_userexists = "Cet utilisateur existe déjà";
$lang_cancel ="Annuler";
$lang_submit = "Envoyer";
break;
// override with translated strings if needed
// missing strings will be displayed in English
if ($config::$lang != "en" && array_key_exists($config::$lang, $langsArr)) {
require_once("lang/{$config::$lang}.php");
}
?>

55
lang/de.php Normal file
View File

@ -0,0 +1,55 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
$lang["title"] = "• μlogger •";
$lang["private"] = "Sie müssen Benutzernamen und Kennwort eingeben, um auf diese Seite zuzugreifen.";
$lang["authfail"] = "Falscher Benutzername oder Passwort";
$lang["user"] = "Benutzer";
$lang["track"] = "Route";
$lang["latest"] = "letzte Position";
$lang["autoreload"] = "Autoneuladen";
$lang["reload"] = "Neuladen";
$lang["download"] = "Download Daten";
$lang["chart"] = "Höhentabelle";
$lang["close"] = "Schließen";
$lang["time"] = "Zeit";
$lang["speed"] = "Geschwindigkeit";
$lang["accuracy"] = "Genauigkeit";
$lang["altitude"] = "Höhe";
$lang["ttime"] = "Gesamte Zeit";
$lang["aspeed"] = "Durchschnittstempo";
$lang["tdistance"] = "Gesamt Entfernung";
$lang["point"] = "Punkt"; //Punkt x von y
$lang["of"] = "von";
$lang["summary"] = "Streckenzusammenfassung";
$lang["suser"] = "Wähle Benutzer";
$lang["logout"] = "Abmelden";
$lang["login"] = "Anmelden";
$lang["username"] = "Benutzername";
$lang["password"] = "Passwort";
$lang["language"] = "Sprache";
$lang["newinterval"] = "Neuen Intervall-Wert eingeben (in Sekunden)";
$lang["api"] = "Karten API";
$lang["language"] = "Sprache";
$lang["units"] = "Maßsystem";
$lang["metric"] = "Metrisches";
$lang["imperial"] = "Angloamerikanisches";
$lang["adminmenu"] = "Verwaltung";
?>

68
lang/en.php Normal file
View File

@ -0,0 +1,68 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
// default language for translations
$lang["title"] = "• μlogger •";
$lang["private"] = "You need login and password to access this page.";
$lang["authfail"] = "Wrong username or password";
$lang["user"] = "User";
$lang["track"] = "Track";
$lang["latest"] = "latest position";
$lang["autoreload"] = "autoreload";
$lang["reload"] = "Reload now";
$lang["download"] = "Download data";
$lang["chart"] = "Altitudes chart";
$lang["close"] = "close";
$lang["time"] = "Time";
$lang["speed"] = "Speed";
$lang["accuracy"] = "Accuracy";
$lang["altitude"] = "Altitude";
$lang["ttime"] = "Total time";
$lang["aspeed"] = "Average speed";
$lang["tdistance"] = "Total dist.";
$lang["point"] = "Point"; //Point x of y
$lang["of"] = "of";
$lang["summary"] = "Trip summary";
$lang["suser"] = "select user";
$lang["logout"] = "log out";
$lang["login"] = "Log in";
$lang["username"] = "Username";
$lang["password"] = "Password";
$lang["language"] = "Language";
$lang["newinterval"] = "Enter new interval value (seconds)";
$lang["api"] = "Map API";
$lang["language"] = "Language";
$lang["units"] = "Units";
$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";
$lang["oldpassword"] = "Old password";
$lang["newpassword"] = "New password";
$lang["newpasswordrepeat"] = "Repeat new password";
$lang["changepass"] = "Change password";
?>

62
lang/fr.php Normal file
View File

@ -0,0 +1,62 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
$lang["title"] = "• μlogger •";
$lang["private"] = "Il faut un nom d'utilisateur et un mot de passe pour accéder à cette page.";
$lang["authfail"] = "Nom d'utilisateur ou mot de passe erroné.";
$lang["user"] = "Utilisateur";
$lang["track"] = "Piste";
$lang["latest"] = "dernière position";
$lang["autoreload"] = "rechargement automatique";
$lang["reload"] = "Recharger maintenant";
$lang["download"] = "Télécharger les données";
$lang["chart"] = "Courbes d'altitudes";
$lang["close"] = "fermer";
$lang["time"] = "Temps";
$lang["speed"] = "Vitesse";
$lang["accuracy"] = "Accélération";
$lang["altitude"] = "Altitude";
$lang["ttime"] = "Temps total";
$lang["aspeed"] = "Vitesse moyenne";
$lang["tdistance"] = "Dist. totale";
$lang["point"] = "Point"; //Point x of y
$lang["of"] = "de";
$lang["summary"] = "Résumé du trajet";
$lang["suser"] = "Sélectionner un utilisateur";
$lang["logout"] = "Déconnexion";
$lang["login"] = "Connexion";
$lang["username"] = "Nom d'utilisateur";
$lang["password"] = "Mot de passe";
$lang["language"] = "Langage";
$lang["newinterval"] = "Entrez un intervalle (en seconde)";
$lang["api"] = "API des cartes";
$lang["language"] = "Langage";
$lang["units"] = "Unités";
$lang["metric"] = "Système métrique";
$lang["imperial"] = "Système anglophone";
$lang["adminmenu"] = "Administration";
$lang["passwordrepeat"] = "Répetez le mot de passe";
$lang["passwordenter"] = "Entrez votre mot de passe";
$lang["usernameenter"] = "Entrez votre nom d'utilisateur";
$lang["adduser"] = "Ajouter un utilisateur";
$lang["userexists"] = "Cet utilisateur existe déjà";
$lang["cancel"] ="Annuler";
$lang["submit"] = "Envoyer";
?>

55
lang/hu.php Normal file
View File

@ -0,0 +1,55 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
$lang["title"] = "• μlogger •";
$lang["private"] = "Felhasználónév és jelszó szükséges a belépéshez";
$lang["authfail"] = "Hibás név vagy jelszó";
$lang["user"] = "Felhasználó";
$lang["track"] = "Útvonal";
$lang["latest"] = "Utolsó rögzített pont";
$lang["autoreload"] = "Automatikus frissítés";
$lang["reload"] = "Frissítés most";
$lang["download"] = "Adatok letöltése";
$lang["chart"] = "Magasság diagramm";
$lang["close"] = "Bezár";
$lang["time"] = "Rögzítés ideje";
$lang["speed"] = "Sebesség";
$lang["accuracy"] = "Pontosság";
$lang["altitude"] = "Magasság";
$lang["ttime"] = "Menetidő";
$lang["aspeed"] = "Átlagsebesség";
$lang["tdistance"] = "Megtett út";
$lang["suser"] = "Felhasználónév";
$lang["point"] = "Rögzített pontok száma";
$lang["of"] = "/";
$lang["summary"] = "Utazás adatai";
$lang["logout"] = "Kilépés";
$lang["login"] = "Belépés";
$lang["username"] = "Felhasználó";
$lang["password"] = "Jelszó";
$lang["language"] = "Nyelv";
$lang["newinterval"] = "Automatikus frissítés ideje (másodpercben)";
$lang["api"] = "Map API";
$lang["language"] = "Nyelv";
$lang["units"] = "Mértékegység";
$lang["metric"] = "Metrikus";
$lang["imperial"] = "Imperal/US";
$lang["adminmenu"] = "Adminisztráció";
?>

61
lang/it.php Normal file
View File

@ -0,0 +1,61 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
$lang["title"] = "• μlogger •";
$lang["private"] = "Devi accedere per visualizzare questa pagina.";
$lang["authfail"] = "Nome utente o password errati.";
$lang["user"] = "Utente";
$lang["track"] = "Traccia";
$lang["latest"] = "ultima posizione";
$lang["autoreload"] = "auto-ricarica";
$lang["reload"] = "Ricaria ora";
$lang["download"] = "Scarica dati";
$lang["chart"] = "Grafico altitudine";
$lang["close"] = "chiudi";
$lang["time"] = "Ora";
$lang["speed"] = "Velocità";
$lang["accuracy"] = "Precisione";
$lang["altitude"] = "Altitudine";
$lang["ttime"] = "Tempo totale";
$lang["aspeed"] = "Velocità media";
$lang["tdistance"] = "Distanza totale";
$lang["point"] = "Punto"; //Point x of y
$lang["of"] = "di";
$lang["summary"] = "Sommario";
$lang["suser"] = "scegli utente";
$lang["logout"] = "esci";
$lang["login"] = "Entra";
$lang["username"] = "Nome Utente";
$lang["password"] = "Password";
$lang["language"] = "Lingua";
$lang["newinterval"] = "Immetti nuovo intervallo (secondi)";
$lang["api"] = "API Mappe";
$lang["units"] = "Unità";
$lang["metric"] = "Metriche";
$lang["imperial"] = "Imperiali";
$lang["adminmenu"] = "Amministazione";
$lang["passwordrepeat"] = "Ripeti password";
$lang["passwordenter"] = "Immetti password";
$lang["usernameenter"] = "Immetti nome utente";
$lang["adduser"] = "Aggiungi utente";
$lang["userexists"] = "L'utente esiste già";
$lang["cancel"] ="Annulla";
$lang["submit"] = "Invia";
?>

67
lang/pl.php Normal file
View File

@ -0,0 +1,67 @@
<?php
/* μlogger
*
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
$lang["title"] = "• μlogger •";
$lang["private"] = "Aby się zalogować musisz podać login i hasło";
$lang["authfail"] = "błędny login lub hasło";
$lang["user"] = "Użytkownik";
$lang["track"] = "Trasa";
$lang["latest"] = "ostatnia pozycja";
$lang["autoreload"] = "odświeżaj";
$lang["reload"] = "Odśwież teraz";
$lang["download"] = "Pobierz dane";
$lang["chart"] = "Wykres przewyższeń";
$lang["close"] = "zamknij";
$lang["time"] = "Czas";
$lang["speed"] = "Prędkość";
$lang["accuracy"] = "Doładność";
$lang["altitude"] = "Wysokość";
$lang["ttime"] = "Czas podróży";
$lang["aspeed"] = "Średnia prędkość";
$lang["tdistance"] = "Odległość";
$lang["suser"] = "wybierz login";
$lang["point"] = "Punkt";
$lang["of"] = "z";
$lang["summary"] = "Podsumowanie";
$lang["logout"] = "wyloguj";
$lang["login"] = "zaloguj";
$lang["username"] = "Login";
$lang["password"] = "Hasło";
$lang["language"] = "Język";
$lang["newinterval"] = "Podaj częstotliwość odświeżania (w sekundach)";
$lang["api"] = "Map API";
$lang["language"] = "Język";
$lang["units"] = "Jednostki";
$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ź";
$lang["oldpassword"] = "Obecne hasło";
$lang["newpassword"] = "Nowe hasło";
$lang["newpasswordrepeat"] = "Powtórz nowe hasło";
$lang["changepass"] = "Zmień hasło";
?>

12
main.js
View File

@ -50,7 +50,7 @@ function displayChart() {
}
var options = {
title: lang_altitude+' ('+unit_m+')',
title: lang['altitude']+' ('+unit_m+')',
hAxis: { textPosition: 'none' },
legend: { position: 'none' }
};
@ -174,12 +174,12 @@ function load(type,userid,trackid) {
function updateSummary(l,d,s) {
var t = document.getElementById('summary');
if (latest==0){
t.innerHTML = '<u>'+lang_summary+'</u><br />'+
lang_tdistance+': '+(d.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+
lang_ttime+': '+s.toHMS();
t.innerHTML = '<u>'+lang['summary']+'</u><br />'+
lang['tdistance']+': '+(d.toKm()*factor_km).toFixed(2)+' '+unit_km+'<br />'+
lang['ttime']+': '+s.toHMS();
}
else {
t.innerHTML = '<u>'+lang_latest+':</u><br />'+l;
t.innerHTML = '<u>'+lang['latest']+':</u><br />'+l;
}
}
@ -297,7 +297,7 @@ function autoReload() {
}
function setTime() {
var i = parseInt(prompt(lang_newinterval));
var i = parseInt(prompt(lang['newinterval']));
if (!isNaN(i) && i!=interval) {
interval = i;
document.getElementById('auto').innerHTML = interval;

View File

@ -18,10 +18,10 @@
function changePass() {
var form = '<form id="passForm" method="post" onsubmit="submitPass(); return false">';
form += '<label><b>' + lang_oldpassword + '</b></label><input type="password" placeholder="' + lang_passwordenter + '" name="oldpass" required>';
form += '<label><b>' + lang_newpassword + '</b></label><input type="password" placeholder="' + lang_passwordenter + '" name="pass" required>';
form += '<label><b>' + lang_newpasswordrepeat + '</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 += '<label><b>' + lang['oldpassword'] + '</b></label><input type="password" placeholder="' + lang['passwordenter'] + '" name="oldpass" required>';
form += '<label><b>' + lang['newpassword'] + '</b></label><input type="password" placeholder="' + lang['passwordenter'] + '" name="pass" required>';
form += '<label><b>' + lang['newpasswordrepeat'] + '</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);
}