From c6efcf185093403a155e22fde6919d70f5f8aee3 Mon Sep 17 00:00:00 2001 From: cTn Date: Thu, 8 May 2014 10:56:41 +0200 Subject: [PATCH] gps i18n support --- _locales/en/messages.json | 37 +++++++++++++++++++++++++++++++++++++ tabs/gps.html | 24 ++++++++++++------------ tabs/gps.js | 2 +- 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c1d54155..5d0b34a7 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -366,5 +366,42 @@ }, "servosEepromSave": { "message": "EEPROM saved" + }, + + "gpsHead": { + "message": "GPS" + }, + "gps3dFix": { + "message": "3D Fix:" + }, + "gpsFixTrue": { + "message": "True" + }, + "gpsFixFalse": { + "message": "False" + }, + "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" } } \ No newline at end of file diff --git a/tabs/gps.html b/tabs/gps.html index 5134d37e..491788d6 100644 --- a/tabs/gps.html +++ b/tabs/gps.html @@ -1,44 +1,44 @@
- GPS + - - + + - + - + - + - + - + - - + +
3D Fix:False
Altitude: 0 m
Latitude: 0.0000 deg
Longitude: 0.0000 deg
Speed: 0 cm/s
Sats: 0
Dist to Home:0 m
- GPS Signal Strength + - + diff --git a/tabs/gps.js b/tabs/gps.js index fc8fe5a6..c7b354b7 100644 --- a/tabs/gps.js +++ b/tabs/gps.js @@ -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) ? 'True' : 'False'); + $('.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');
Sat ID QtySignal StrengthSignal Strength
0