diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c66fe245..1b9a8fd5 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -213,6 +213,9 @@ "message": "The firmware on this device needs upgrading to a newer version. Use CLI for backup before flashing. CLI backup/restore procedure is in the documention.
Alternatively download and use an old version of the configurator if you are not ready to upgrade." }, + "infoVersions": { + "message" : "Running - OS: $1, Chrome: $2, Configurator: $3" + }, "tabSwitchConnectionRequired": { "message": "You need to connect before you can view any of the tabs." }, @@ -1676,7 +1679,7 @@ "message": "Sonar - cm" }, "sensorsDebugTitle": { - "message": "Debug 0" + "message": "Debug" }, "cliInfo": { @@ -2001,6 +2004,21 @@ "firmwareFlasherFailedToLoadOnlineFirmware": { "message": "Failed to load remote firmware" }, + "firmwareFlasherNoFirmwareSelected": { + "message": "No firmware selected to load" + }, + "firmwareFlasherNoValidPort": { + "message": "Please select valid serial port" + }, + "firmwareFlasherWritePermissions": { + "message": "You don't have write permissions for this file" + }, + "firmwareFlasherFlashTrigger": { + "message": "Detected: $1 - triggering flash on connect" + }, + "firmwareFlasherPreviousDevice": { + "message": "Detected: $1 - previous device still flashing, please replug to try again" + }, "ledStripHelp": { "message": "The flight controller can control colors and effects of individual LEDs on a strip.
Configure LEDs on the grid, configure wiring order then attach LEDs on your aircraft according to grid positions. LEDs without wire ordering number will not be saved.
Double-click on a color to edit the HSV values." @@ -2879,6 +2897,12 @@ "osdSectionHelpWarnings": { "message": "Enable or disable warnings that are shown on the WARNINGS element." }, + "osdSettingsSaved": { + "message": "OSD settings saved" + }, + "osdWritePermissions": { + "message": "You don't have write permissions for this file" + }, "mainHelpArmed": { "message": "Motor Arming" diff --git a/main.js b/main.js index 3e602623..6fb4b0ff 100644 --- a/main.js +++ b/main.js @@ -21,9 +21,7 @@ $(document).ready(function () { localize(); // alternative - window.navigator.appVersion.match(/Chrome\/([0-9.]*)/)[1]; - GUI.log('Running - OS: ' + GUI.operating_system + ', ' + - 'Chrome: ' + window.navigator.appVersion.replace(/.*Chrome\/([0-9.]*).*/, "$1") + ', ' + - 'Configurator: ' + getManifestVersion() + ''); + GUI.log(chrome.i18n.getMessage('infoVersions',[GUI.operating_system, window.navigator.appVersion.replace(/.*Chrome\/([0-9.]*).*/, "$1"), getManifestVersion()])); $('#logo .version').text(getManifestVersion()); updateStatusBarVersion(); diff --git a/tabs/firmware_flasher.js b/tabs/firmware_flasher.js index 7e01c585..62f0298e 100755 --- a/tabs/firmware_flasher.js +++ b/tabs/firmware_flasher.js @@ -237,7 +237,7 @@ TABS.firmware_flasher.initialize = function (callback) { $('a.load_remote_file').click(function (evt) { if ($('select[name="firmware_version"]').val() == "0") { - GUI.log("No firmware selected to load"); + GUI.log(chrome.i18n.getMessage('firmwareFlasherNoFirmwareSelected')); return; } @@ -322,7 +322,7 @@ TABS.firmware_flasher.initialize = function (callback) { STM32.connect(port, baud, parsed_hex, options); } else { console.log('Please select valid serial port'); - GUI.log('Please select valid serial port'); + GUI.log(chrome.i18n.getMessage('firmwareFlasherNoValidPort')); } } else { STM32DFU.connect(usbDevices.STM32DFU, parsed_hex, options); @@ -373,7 +373,7 @@ TABS.firmware_flasher.initialize = function (callback) { }); } else { console.log('You don\'t have write permissions for this file, sorry.'); - GUI.log('You don\'t have write permissions for this file'); + GUI.log(chrome.i18n.getMessage('firmwareFlasherWritePermissions')); } }); }); @@ -442,7 +442,7 @@ TABS.firmware_flasher.initialize = function (callback) { var port = result[0]; if (!GUI.connect_lock) { - GUI.log('Detected: ' + port + ' - triggering flash on connect'); + GUI.log(chrome.i18n.getMessage('firmwareFlasherFlashTrigger', [port])); console.log('Detected: ' + port + ' - triggering flash on connect'); // Trigger regular Flashing sequence @@ -450,7 +450,7 @@ TABS.firmware_flasher.initialize = function (callback) { $('a.flash_firmware').click(); }, 100); // timeout so bus have time to initialize after being detected by the system } else { - GUI.log('Detected ' + port + ' - previous device still flashing, please replug to try again'); + GUI.log(chrome.i18n.getMessage('firmwareFlasherPreviousDevice', [port])); } // Since current port_detected request was consumed, create new one diff --git a/tabs/landing.html b/tabs/landing.html index 3eb94754..7cfd3f34 100644 --- a/tabs/landing.html +++ b/tabs/landing.html @@ -39,7 +39,7 @@
- Changelog +
diff --git a/tabs/osd.js b/tabs/osd.js index f60b03ac..badc9984 100755 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -1653,7 +1653,7 @@ TABS.osd.initialize = function (callback) { $('a.save').click(function() { var self = this; MSP.promise(MSPCodes.MSP_EEPROM_WRITE); - GUI.log('OSD settings saved'); + GUI.log(chrome.i18n.getMessage('osdSettingsSaved')); var oldText = $(this).text(); $(this).html("Saved"); setTimeout(function () { @@ -1761,7 +1761,7 @@ TABS.osd.initialize = function (callback) { }); } else { console.log('You don\'t have write permissions for this file, sorry.'); - GUI.log('You don\'t have write permissions for this file'); + GUI.log(chrome.i18n.getMessage('osdWritePermissions')); } }); });