diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ff9412d74e..ec79a1e689 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -430,5 +430,78 @@ }, "cliInputPlaceholder": { "message": "Write your command here" + }, + + "firmwareFlasherPath": { + "message": "Path:" + }, + "firmwareFlasherSize": { + "message": "Size:" + }, + "firmwareFlasherStatus": { + "message": "Status:" + }, + "firmwareFlasherProgress": { + "message": "Progress:" + }, + "firmwareFlasherNote": { + "message": "If you are flashing board with baseflight already flashed (updating), leave this checkbox unchecked.
If you are flashing \"bare\" board with no firmware preloaded or you have bootloader pins shorted, check this box.
" + }, + "firmwareFlasherNoReboot": { + "message": "No reboot sequence" + }, + "firmwareFlasherFlashOnConnect": { + "message": "Flash on connect" + }, + "firmwareFlasherFullChipErase": { + "message": "Full Chip Erase" + }, + "firmwareFlasherButtonLoadLocal": { + "message": "Load Firmware [Local]" + }, + "firmwareFlasherButtonLoadOnline": { + "message": "Load Firmware [Online]" + }, + "firmwareFlasherFlashFirmware": { + "message": "Flash Firmware" + }, + "firmwareFlasherGithubInfoHead": { + "message": "Github Firmware Info" + }, + "firmwareFlasherCommiter": { + "message": "Committer:" + }, + "firmwareFlasherDate": { + "message": "Date:" + }, + "firmwareFlasherMessage": { + "message": "Message:" + }, + "firmwareFlasherWarninghead": { + "message": "Warning" + }, + "firmwareFlasherWarningText": { + "message": "Please do not try to flash non-baseflight hardware with this firmware flasher (it wont work).
Do not disconnect the board or turn off your computer while flashing.

Note: STM32 bootloader is stored in ROM, it cannot be bricked.
Note: Auto-Connect is always disabled while you are inside firmware flasher.
" + }, + "firmwareFlasherButtonLeave": { + "message": "Leave Firmware Flasher" + }, + "firmwareFlasherFirmwareNotLoaded": { + "message": "Firmware not loaded" + }, + "firmwareFlasherFirmwareLoaded": { + "message": "Firmware loaded, ready for flashing" + }, + "firmwareFlasherHexCorrupted": { + "message": "HEX file appears to be corrupted" + }, + "firmwareFlasherRemoteFirmwareLoaded": { + "message": "Remote Firmware loaded, ready for flashing" + }, + "firmwareFlasherFailedToLoadOnlineFirmware": { + "message": "Failed to load remote firmware" + }, + "firmwareFlasherWaitForFinish": { + "message": "You can't do this right now, please wait for current operation to finish ..." } } \ No newline at end of file diff --git a/tabs/firmware_flasher.html b/tabs/firmware_flasher.html index 4bce6a18c9..2d48123330 100644 --- a/tabs/firmware_flasher.html +++ b/tabs/firmware_flasher.html @@ -1,43 +1,45 @@
- Path:empty
- Size:0 bytes
- Status:Firmware not loaded
- Progress: + empty
+ 0 bytes
+ Firmware not loaded
+
-

- If you are flashing board with baseflight already flashed (updating), leave this checkbox unchecked.
- If you are flashing "bare" board with no firmware preloaded or you have bootloader pins shorted, check this box.
+

-
- -
+
+ +
- Load Firmware [Local] - Load Firmware [Online] - Flash Firmware + + +
-
Github Firmware Info
+

- Committer:
- Date:
- Message: +
+
+

-
Warning
-

- Please do not try to flash non-baseflight hardware with this firmware flasher (it wont work).
- Do not disconnect the board or turn off your computer while flashing.
-
- Note: STM32 bootloader is stored in ROM, it cannot be bricked.
- Note: Auto-Connect is always disabled while you are inside firmware flasher.
+

+

- Leave Firmware Flasher +
\ No newline at end of file diff --git a/tabs/firmware_flasher.js b/tabs/firmware_flasher.js index 684cebe43c..9b73554b08 100644 --- a/tabs/firmware_flasher.js +++ b/tabs/firmware_flasher.js @@ -46,12 +46,12 @@ function tab_initialize_firmware_flasher() { parsed_hex = data; if (parsed_hex) { - STM32.GUI_status('Firmware loaded, ready for flashing'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherFirmwareLoaded')); $('a.flash_firmware').removeClass('locked'); $('span.size').html(parsed_hex.bytes_total + ' bytes'); } else { - STM32.GUI_status('HEX file appears to be corrupted'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherHexCorrupted')); } }); } @@ -71,17 +71,17 @@ function tab_initialize_firmware_flasher() { parsed_hex = data; if (parsed_hex) { - STM32.GUI_status('Remote Firmware loaded, ready for flashing'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded')); $('a.flash_firmware').removeClass('locked'); - $('span.path').html('Using remote Firmware'); - $('span.size').html(parsed_hex.bytes_total + ' bytes'); + $('span.path').text('Using remote Firmware'); + $('span.size').text(parsed_hex.bytes_total + ' bytes'); } else { - STM32.GUI_status('HEX file appears to be corrupted'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherHexCorrupted')); } }); }).fail(function() { - STM32.GUI_status('Failed to load remote firmware'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware')); $('a.flash_firmware').addClass('locked'); }); @@ -91,9 +91,9 @@ function tab_initialize_firmware_flasher() { var date = ('0' + (d.getMonth() + 1)).slice(-2) + '.' + ('0' + (d.getDate() + 1)).slice(-2) + '.' + d.getFullYear(); date += ' @ ' + ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2); - $('div.git_info .committer').html(data.commit.author.name); - $('div.git_info .date').html(date); - $('div.git_info .message').html(data.commit.message); + $('div.git_info .committer').text(data.commit.author.name); + $('div.git_info .date').text(date); + $('div.git_info .message').text(data.commit.message); $('div.git_info').slideDown(); }); @@ -105,7 +105,7 @@ function tab_initialize_firmware_flasher() { if (parsed_hex != false) { STM32.connect(parsed_hex); } else { - STM32.GUI_status('Firmware not loaded'); + STM32.GUI_status(chrome.i18n.getMessage('firmwareFlasherFirmwareNotLoaded')); } } } @@ -289,7 +289,7 @@ function tab_initialize_firmware_flasher() { tab_initialize_default(); }); } else { - GUI.log('You can\'t do this right now, please wait for current operation to finish ...'); + GUI.log(chrome.i18n.getMessage('firmwareFlasherWaitForFinish')); } }); });