diff options
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolEncoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/T55ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/CarscopProtocolDecoderTest.java | 3 | ||||
-rw-r--r-- | test/org/traccar/protocol/T55ProtocolDecoderTest.java | 8 | ||||
-rw-r--r-- | web/app/Resources.js | 4 | ||||
-rw-r--r-- | web/app/view/map/Map.js | 2 | ||||
-rw-r--r-- | web/l10n/dk.js | 86 | ||||
-rw-r--r-- | web/l10n/nl.js | 86 | ||||
-rw-r--r-- | web/locale.js | 2 |
9 files changed, 190 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolEncoder.java b/src/org/traccar/protocol/Gps103ProtocolEncoder.java index 50a15350a..db4bbc832 100644 --- a/src/org/traccar/protocol/Gps103ProtocolEncoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolEncoder.java @@ -48,7 +48,7 @@ public class Gps103ProtocolEncoder extends StringProtocolEncoder implements Stri case Command.TYPE_POSITION_PERIODIC: return formatCommand(command, "**,imei:{%s},C,{%s}", this, Command.KEY_UNIQUE_ID, Command.KEY_FREQUENCY); case Command.TYPE_ENGINE_STOP: - return formatCommand(command, "**,imei:{%s},J;", Command.KEY_UNIQUE_ID); + return formatCommand(command, "**,imei:{%s},J", Command.KEY_UNIQUE_ID); case Command.TYPE_ENGINE_RESUME: return formatCommand(command, "**,imei:{%s},K", Command.KEY_UNIQUE_ID); case Command.TYPE_ALARM_ARM: diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index 63444ccd4..1376ca123 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -50,9 +50,9 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { private static final Pattern patternGPGGA = Pattern.compile( "\\$GPGGA," + "(\\d{2})(\\d{2})(\\d{2})\\.?\\d*," + // Time - "(\\d{2})(\\d{2}\\.\\d+)," + // Latitude + "(\\d+)(\\d{2}\\.\\d+)," + // Latitude "([NS])," + - "(\\d{3})(\\d{2}\\.\\d+)," + // Longitude + "(\\d+)(\\d{2}\\.\\d+)," + // Longitude "([EW])," + ".+"); diff --git a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java index 8dc29b419..2e9cb60b9 100644 --- a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java +++ b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java @@ -21,6 +21,9 @@ public class CarscopProtocolDecoderTest extends ProtocolDecoderTest { verify(decoder.decode(null, null, "*040331141830UA012Hi-jack061825A2934.0133N10627.2544E000.0040331309.6200000000L000000")); + verify(decoder.decode(null, null, + "*150817160254UB05CC8011400042499160254A2106.8799S14910.2583E000.0150817158.3511111111L000000")); + } } diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java index e967671f5..2aa82f400 100644 --- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java @@ -11,7 +11,7 @@ public class T55ProtocolDecoderTest extends ProtocolDecoderTest { public void testDecode() throws Exception { T55ProtocolDecoder decoder = new T55ProtocolDecoder(new T55Protocol()); - + assertNull(decoder.decode(null, null, "$GPFID,ID123456ABC")); assertNull(decoder.decode(null, null, "$PGID,359853000144328*0F")); @@ -59,6 +59,12 @@ public class T55ProtocolDecoderTest extends ProtocolDecoderTest { verify(decoder.decode(null, null, "990000561287964,$GPRMC,213516.0,A,4337.216791,N,11611.995877,W,0.0,335.4,181214,,,A * 72")); + verify(decoder.decode(null, null, + "355096030432529$GPGGA,000000.00,3136.599,S,5213.981,W,1,7,2.13,250.00,M,-16.384,M,3550960304325290.0,1")); + + verify(decoder.decode(null, null, + "355096030432529$GPGGA,000000.00,3136.628,S,5213.990,W,1,7,2.13,250.00,M,-16.384,M,0.0,1")); + } } diff --git a/web/app/Resources.js b/web/app/Resources.js index 851658646..73cee7b2d 100644 --- a/web/app/Resources.js +++ b/web/app/Resources.js @@ -26,8 +26,8 @@ var styles = { reportTime: 100, reportFormat: 'Y-m-d H:i:s', - mapDefaultLat: -0.1275, - mapDefaultLon: 51.507222, + mapDefaultLat: 51.507222, + mapDefaultLon: -0.1275, mapDefaultZoom: 6, mapMaxZoom: 19, diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js index 6b323e555..9d9a92886 100644 --- a/web/app/view/map/Map.js +++ b/web/app/view/map/Map.js @@ -63,7 +63,7 @@ Ext.define('Traccar.view.map.Map', { var zoom = user.get('zoom') || server.get('zoom') || styles.mapDefaultZoom; this.mapView = new ol.View({ - center: ol.proj.fromLonLat([lat, lon]), + center: ol.proj.fromLonLat([ lon, lat ]), zoom: zoom, maxZoom: styles.mapMaxZoom }); diff --git a/web/l10n/dk.js b/web/l10n/dk.js new file mode 100644 index 000000000..c70ec3ef0 --- /dev/null +++ b/web/l10n/dk.js @@ -0,0 +1,86 @@ +var strings = { + sharedLoading: 'Loading...', + sharedSave: 'Gem', + sharedCancel: 'Fortryd', + sharedAdd: 'Tilføj', + sharedEdit: 'Rediger', + sharedRemove: 'Fjern', + sharedRemoveConfirm: 'Fjern enhed?', + sharedKm: 'km', + sharedMi: 'mi', + sharedKmh: 'km/t', + sharedMph: 'mph', + sharedHour: 'Time', + sharedMinute: 'Minut', + sharedSecond: 'Sekund', + + errorTitle: 'Fejl', + errorUnknown: 'Ukendt Fejl', + + userName: 'Navn', + userEmail: 'Email', + userPassword: 'Kodeord', + userAdmin: 'Admin', + + loginTitle: 'Log på', + loginLanguage: 'Sprog', + loginRegister: 'Registrer', + loginLogin: 'Log på', + loginFailed: 'Fejl i email adresse eller kodeord', + loginCreated: 'Ny bruger er registreret', + loginLogout: 'Log af', + + deviceDialog: 'Enhed', + deviceTitle: 'Enheder', + deviceName: 'Navn', + deviceIdentifier: 'Imei nr', + deviceCommand: 'Kommando', + + settingsTitle: 'Indstillinger', + settingsUser: 'Konto', + settingsServer: 'Server', + settingsUsers: 'Brugere', + settingsDistanceUnit: 'Distance', + settingsSpeedUnit: 'Hastighed', + + reportTitle: 'Rapporter', + reportDevice: 'Enhed', + reportFrom: 'Fra', + reportTo: 'Til', + reportShow: 'Vis', + reportClear: 'Ryd', + + positionTime: 'Tid', + positionValid: 'Valid', + positionLatitude: '>Breddegrad', + positionLongitude: 'Længdegrad', + positionAltitude: 'Højde', + positionSpeed: 'Hastighed', + positionCourse: 'Kurs', + positionAddress: 'Addresse', + positionProtocol: 'Protocol', + + serverTitle: 'Server indstillinger', + serverZoom: 'Zoom', + serverRegistration: 'Registrering', + + mapTitle: 'Kort', + mapLayer: 'Kort opsætning', + mapOsm: 'Open Street Map', + mapBingRoad: 'Bing Maps Road', + mapBingAerial: 'Bing Maps Aerial', + + stateTitle: 'Status', + stateName: 'Parameter', + stateValue: 'Værdi', + + commandTitle: 'Kommando', + commandSend: 'Send', + commandType: 'Type', + commandPositionPeriodic: 'Periodisk Rapportering', + commandPositionStop: 'Stop Rapportering', + commandEngineStop: 'Stop motor', + commandEngineResume: 'Genstart motor', + commandFrequency: 'Frekvens', + commandUnit: 'Enhed' +}; diff --git a/web/l10n/nl.js b/web/l10n/nl.js new file mode 100644 index 000000000..5f4571af6 --- /dev/null +++ b/web/l10n/nl.js @@ -0,0 +1,86 @@ +var strings = { + sharedLoading: 'Laden...', + sharedSave: 'Opslaan', + sharedCancel: 'Annuleren', + sharedAdd: 'Toevoegen', + sharedEdit: 'Bewerken', + sharedRemove: 'Verwijderen', + sharedRemoveConfirm: 'Verwijder item?', + sharedKm: 'km', + sharedMi: 'mi', + sharedKmh: 'km/h', + sharedMph: 'mph', + sharedHour: 'Uur', + sharedMinute: 'Minuut', + sharedSecond: 'Seconde', + + errorTitle: 'Fout', + errorUnknown: 'Onbekende fout', + + userName: 'Gebruikersnaam', + userEmail: 'Email', + userPassword: 'WachtwoordPassword', + userAdmin: 'Admin', + + loginTitle: 'Inloggen', + loginLanguage: 'Taal', + loginRegister: 'Registeren', + loginLogin: 'Inloggen', + loginFailed: 'Onjuiste emailadres of wachtwoord', + loginCreated: 'Nieuwe gebruiker is geregistreerd', + loginLogout: 'Uitloggen', + + deviceDialog: 'Apparaat', + deviceTitle: 'Apparaten', + deviceName: 'Naam', + deviceIdentifier: 'Identifier', + deviceCommand: 'Commando', + + settingsTitle: 'Instellingen', + settingsUser: 'Account', + settingsServer: 'Server', + settingsUsers: 'Gebruikers', + settingsDistanceUnit: 'Afstand', + settingsSpeedUnit: 'Snelheid', + + reportTitle: 'Reports', + reportDevice: 'Apparaat', + reportFrom: 'Van', + reportTo: 'Naar', + reportShow: 'Laten zien', + reportClear: 'Leegmaken', + + positionTime: 'Tijd', + positionValid: 'Geldig', + positionLatitude: 'Latitude', + positionLongitude: 'Longitude', + positionAltitude: 'Altitude', + positionSpeed: 'Snelheid', + positionCourse: 'Koers', + positionAddress: 'Adres', + positionProtocol: 'Protocol', + + serverTitle: 'Server Instellingen', + serverZoom: 'Zoom', + serverRegistration: 'Registratie', + + mapTitle: 'Kaart', + mapLayer: 'Kaart laag', + mapOsm: 'Open Street Map', + mapBingRoad: 'Bing Maps Wegen', + mapBingAerial: 'Bing Maps Luchtfoto', + + stateTitle: 'Status', + stateName: 'Parameter', + stateValue: 'Waarde', + + commandTitle: 'Commando', + commandSend: 'Verstuur', + commandType: 'Type', + commandPositionPeriodic: 'Periodic Reporting', + commandPositionStop: 'Stop Reporting', + commandEngineStop: 'Engine Stop', + commandEngineResume: 'Engine Resume', + commandFrequency: 'Frequentie', + commandUnit: 'Eenheid' +}; diff --git a/web/locale.js b/web/locale.js index 37ae0992e..353f47cbc 100644 --- a/web/locale.js +++ b/web/locale.js @@ -20,9 +20,11 @@ Ext.Loader.setConfig({ var availableLanguages = { 'de': { name: 'Deutsch', code: 'de' }, + 'dk': { name: 'Dansk', code: 'dk' }, 'en': { name: 'English', code: 'en' }, 'es': { name: 'Español', code: 'es' }, 'fr': { name: 'Français', code: 'fr' }, + 'nl': { name: 'Nederlands', code: 'nl' }, 'pl': { name: 'Polski', code: 'pl' }, 'pt': { name: 'Português', code: 'pt' }, 'ru': { name: 'Русский', code: 'ru' }, |