Skip to content

Commit

Permalink
Merge branch 'iNavFlight:master' into language_specific_font
Browse files Browse the repository at this point in the history
  • Loading branch information
sensei-hacker authored Dec 13, 2024
2 parents 1e2da77 + 56e5656 commit 986ae1b
Show file tree
Hide file tree
Showing 10 changed files with 6,405 additions and 38 deletions.
2 changes: 1 addition & 1 deletion js/data_storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var CONFIGURATOR = {
// all versions are specified and compared using semantic versioning http://semver.org/
'minfirmwareVersionAccepted': '7.0.0',
'minfirmwareVersionAccepted': '8.0.0',
'maxFirmwareVersionAccepted': '9.0.0', // Condition is < (lt) so we accept all in 8.x branch
'connectionValid': false,
'connectionValidCliOnly': false,
Expand Down
2 changes: 1 addition & 1 deletion js/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const i18nextXHRBackend = require('i18next-xhr-backend');
const Store = require('electron-store');
const store = new Store();

const availableLanguages = ['en', 'uk'];
const availableLanguages = ['en', 'uk','zh_CN'];

const i18n = {};

Expand Down
14 changes: 11 additions & 3 deletions js/ublox/UBLOX.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ var ublox = (function () {

if (successCallback != null) {
req.onload = (event) => {
successCallback(req.response);
if(req.status == 200) {
successCallback(req.response);
} else {
failCallback(event);
}
};
}

Expand All @@ -164,13 +168,17 @@ var ublox = (function () {
}
}

req.send(null);
try {
req.send(null);
} catch(error) {
GUI.alert(i18n.getMessage("gpsAssistnowLoadDataError"));
console.log(i18n.getMessage("gpsAssistnowLoadDataError") + ':' + error.toString());
}
}


function loadError(event) {
GUI.alert(i18n.getMessage("gpsAssistnowLoadDataError"));
console.log(i18n.getMessage("gpsAssistnowLoadDataError") + ':' + event.toString());
}

// For more info on assistnow, check:
Expand Down
4 changes: 4 additions & 0 deletions locale/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"message": "українська",
"_comment": "Don't translate!"
},
"language_zh_CN": {
"message": "简体中文",
"_comment": "Don't translate!"
},
"language": {
"message": "Language"
},
Expand Down
258 changes: 227 additions & 31 deletions locale/uk/messages.json

Large diffs are not rendered by default.

Loading

0 comments on commit 986ae1b

Please sign in to comment.