serial backend now support i18n
parent
e1ceee4fa4
commit
245328272c
|
@ -59,6 +59,9 @@
|
||||||
"serialPortOpened": {
|
"serialPortOpened": {
|
||||||
"message": "Serial port <span style=\"color: green\">successfully</span> opened with ID: $1"
|
"message": "Serial port <span style=\"color: green\">successfully</span> opened with ID: $1"
|
||||||
},
|
},
|
||||||
|
"serialPortOpenFail": {
|
||||||
|
"message": "<span style=\"color: red\">Failed</span> to open serial port"
|
||||||
|
},
|
||||||
"serialPortClosedOk": {
|
"serialPortClosedOk": {
|
||||||
"message": "Serial port <span style=\"color: green\">successfully</span> closed"
|
"message": "Serial port <span style=\"color: green\">successfully</span> closed"
|
||||||
},
|
},
|
||||||
|
@ -72,6 +75,12 @@
|
||||||
"firmwareVersionNotSupported": {
|
"firmwareVersionNotSupported": {
|
||||||
"message": "This firmware version is <span style=\"color: red\">not supported</span>. Please upgrade to version <strong>$1</strong> or higher"
|
"message": "This firmware version is <span style=\"color: red\">not supported</span>. Please upgrade to version <strong>$1</strong> or higher"
|
||||||
},
|
},
|
||||||
|
"firmwareVersion": {
|
||||||
|
"message": "Firmware Version: <strong>$1</strong>"
|
||||||
|
},
|
||||||
|
"uniqueDeviceIdReceived": {
|
||||||
|
"message": "Unique device ID <span style=\"color: green\">received</span> - <strong>0x$1</strong>"
|
||||||
|
},
|
||||||
|
|
||||||
"notifications_app_just_updated_to_version": {
|
"notifications_app_just_updated_to_version": {
|
||||||
"message": "Application just updated to version: $1"
|
"message": "Application just updated to version: $1"
|
||||||
|
@ -94,9 +103,5 @@
|
||||||
},
|
},
|
||||||
"statusbar_cycle_time": {
|
"statusbar_cycle_time": {
|
||||||
"message": "Cycle Time:"
|
"message": "Cycle Time:"
|
||||||
},
|
|
||||||
|
|
||||||
"firmware_version": {
|
|
||||||
"message": "Firmware Version: <strong>$1</strong>"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -150,11 +150,11 @@ function onOpen(openInfo) {
|
||||||
|
|
||||||
// request configuration data
|
// request configuration data
|
||||||
send_message(MSP_codes.MSP_UID, false, false, function() {
|
send_message(MSP_codes.MSP_UID, false, false, function() {
|
||||||
GUI.log('Unique device ID <span style="color: green">received</span> - <strong>0x' + CONFIG.uid[0].toString(16) + CONFIG.uid[1].toString(16) + CONFIG.uid[2].toString(16) + '</strong>');
|
GUI.log(chrome.i18n.getMessage('uniqueDeviceIdReceived', [CONFIG.uid[0].toString(16) + CONFIG.uid[1].toString(16) + CONFIG.uid[2].toString(16)]));
|
||||||
send_message(MSP_codes.MSP_IDENT, false, false, function() {
|
send_message(MSP_codes.MSP_IDENT, false, false, function() {
|
||||||
GUI.timeout_remove('connecting'); // kill connecting timer
|
GUI.timeout_remove('connecting'); // kill connecting timer
|
||||||
|
|
||||||
GUI.log(chrome.i18n.getMessage('firmware_version', [CONFIG.version]));
|
GUI.log(chrome.i18n.getMessage('firmwareVersion', [CONFIG.version]));
|
||||||
|
|
||||||
if (CONFIG.version >= firmware_version_accepted) {
|
if (CONFIG.version >= firmware_version_accepted) {
|
||||||
configuration_received = true;
|
configuration_received = true;
|
||||||
|
@ -169,9 +169,9 @@ function onOpen(openInfo) {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('Failed to open serial port');
|
console.log('Failed to open serial port');
|
||||||
GUI.log('Failed to open serial port', 'red');
|
GUI.log(chrome.i18n.getMessage('serialPortOpenFail'));
|
||||||
|
|
||||||
$('div#port-picker a.connect').text('Connect');
|
$('div#port-picker a.connect').text(chrome.i18n.getMessage('connect'));
|
||||||
$('div#port-picker a.connect').removeClass('active');
|
$('div#port-picker a.connect').removeClass('active');
|
||||||
|
|
||||||
// unlock port select & baud
|
// unlock port select & baud
|
||||||
|
|
Loading…
Reference in New Issue