gps i18n support
parent
aaacf6cea8
commit
c6efcf1850
|
@ -366,5 +366,42 @@
|
|||
},
|
||||
"servosEepromSave": {
|
||||
"message": "EEPROM <span style=\"color: green\">saved</span>"
|
||||
},
|
||||
|
||||
"gpsHead": {
|
||||
"message": "GPS"
|
||||
},
|
||||
"gps3dFix": {
|
||||
"message": "3D Fix:"
|
||||
},
|
||||
"gpsFixTrue": {
|
||||
"message": "<span style=\"color: green\">True</span>"
|
||||
},
|
||||
"gpsFixFalse": {
|
||||
"message": "<span style=\"color: red\">False</span>"
|
||||
},
|
||||
"gpsAltitude": {
|
||||
"message": "Altitude:"
|
||||
},
|
||||
"gpsLat": {
|
||||
"message": "Latitude:"
|
||||
},
|
||||
"gpsLon": {
|
||||
"message": "Longitude:"
|
||||
},
|
||||
"gpsSpeed": {
|
||||
"message": "Speed:"
|
||||
},
|
||||
"gpsSats": {
|
||||
"message": "Sats:"
|
||||
},
|
||||
"gpsDistToHome": {
|
||||
"message": "Dist to Home:"
|
||||
},
|
||||
"gpsSignalStrHead": {
|
||||
"message": "GPS Signal Strength"
|
||||
},
|
||||
"gpsSignalStr": {
|
||||
"message": "Signal Strength"
|
||||
}
|
||||
}
|
|
@ -1,44 +1,44 @@
|
|||
<div class="tab-gps">
|
||||
<div class="GPS_info">
|
||||
<span class="head">GPS</span>
|
||||
<span class="head" i18n="gpsHead"></span>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 85px">3D Fix:</td>
|
||||
<td class="fix"><span style="color: red">False</span></td>
|
||||
<td style="width: 85px" i18n="gps3dFix"></td>
|
||||
<td class="fix" i18n="gpsFixFalse"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Altitude:</td>
|
||||
<td i18n="gpsAltitude"></td>
|
||||
<td class="alt">0 m</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Latitude:</td>
|
||||
<td i18n="gpsLat"></td>
|
||||
<td class="lat"><a href="#" target="_blank">0.0000 deg</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Longitude:</td>
|
||||
<td i18n="gpsLon"></td>
|
||||
<td class="lon"><a href="#" target="_blank">0.0000 deg</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Speed:</td>
|
||||
<td i18n="gpsSpeed"></td>
|
||||
<td class="speed">0 cm/s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sats:</td>
|
||||
<td i18n="gpsSats"></td>
|
||||
<td class="sats">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dist to Home:</td>
|
||||
<td class="distToHome">0 m</td>
|
||||
<td i18n="gpsDistToHome"></td>
|
||||
<td class="distToHome"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="GPS_signal_strength">
|
||||
<span class="head">GPS Signal Strength</span>
|
||||
<span class="head" i18n="gpsSignalStrHead"></span>
|
||||
<table>
|
||||
<tr class="titles">
|
||||
<td style="width: 40px;">Sat ID</td>
|
||||
<td style="width: 30px;">Qty</td>
|
||||
<td>Signal Strength</td>
|
||||
<td i18n="gpsSignalStr">Signal Strength</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0</td>
|
||||
|
|
|
@ -25,7 +25,7 @@ function tab_initialize_gps () {
|
|||
var lon = GPS_DATA.lon / 100000000;
|
||||
var url = 'https://maps.google.com/?q=' + lat + ',' + lon;
|
||||
|
||||
$('.GPS_info td.fix').html((GPS_DATA.fix) ? '<span style="color: green">True</span>' : '<span style="color: red">False</span>');
|
||||
$('.GPS_info td.fix').html((GPS_DATA.fix) ? chrome.i18n.getMessage('gpsFixTrue') : chrome.i18n.getMessage('gpsFixFalse'));
|
||||
$('.GPS_info td.alt').text(GPS_DATA.alt + ' m');
|
||||
$('.GPS_info td.lat a').prop('href', url).text(lat.toFixed(4) + ' deg');
|
||||
$('.GPS_info td.lon a').prop('href', url).text(lon.toFixed(4) + ' deg');
|
||||
|
|
Loading…
Reference in New Issue