receiver i18n support

10.3.x-maintenance
cTn 2014-05-06 23:33:47 +02:00
parent eb973cff16
commit a7c0e56254
3 changed files with 33 additions and 8 deletions

View File

@ -279,5 +279,30 @@
},
"pidTuningEepromSaved": {
"message": "EEPROM <span style=\"color: green\">saved</span>"
},
"receiverThrottleMid": {
"message": "Throttle MID"
},
"receiverThrottleExpo": {
"message": "Throttle EXPO"
},
"receiverRcRate": {
"message": "RC Rate"
},
"receiverRcExpo": {
"message": "RC Expo"
},
"receiverButtonSave": {
"message": "Save"
},
"receiverButtonRefresh": {
"message": "Refresh"
},
"receiverDataRefreshed": {
"message": "RC Tuning data <strong>refreshed</strong>"
},
"receiverEepromSaved": {
"message": "EEPROM <span style=\"color: green\">saved</span>"
}
}

View File

@ -52,8 +52,8 @@
<div class="tunings">
<table class="throttle">
<tr>
<th>Throttle MID</th>
<th>Throttle EXPO</th>
<th i18n="receiverThrottleMid"></th>
<th i18n="receiverThrottleExpo"></th>
</tr>
<tr>
<td><input type="number" name="mid" step="0.01" min="0" max="1" /></td>
@ -62,16 +62,16 @@
</table>
<table class="rate">
<tr>
<th>RC Rate</th>
<th>RC Expo</th>
<th i18n="receiverRcRate"></th>
<th i18n="receiverRcExpo"></th>
</tr>
<tr>
<td><input type="number" name="rate" step="0.01" min="0" max="2.5" /></td>
<td><input type="number" name="expo" step="0.01" min="0" max="1" /></td>
</tr>
</table>
<a class="update" href="#">Save</a>
<a class="refresh" href="#">Refresh</a>
<a class="update" href="#" i18n="receiverButtonSave"></a>
<a class="refresh" href="#" i18n="receiverButtonRefresh"></a>
</div>
<div class="curves">
<div class="throttle_curve">

View File

@ -83,7 +83,7 @@ function tab_initialize_receiver() {
$('a.refresh').click(function() {
send_message(MSP_codes.MSP_RC_TUNING, false, false, function() {
GUI.log('RC Tuning data <strong>refreshed</strong>');
GUI.log(chrome.i18n.getMessage('receiverDataRefreshed'));
// fill in data from RC_tuning
$('.tunings .throttle input[name="mid"]').val(RC_tuning.throttle_MID.toFixed(2));
@ -120,7 +120,7 @@ function tab_initialize_receiver() {
function save_to_eeprom() {
send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
GUI.log(chrome.i18n.getMessage('receiverEepromSaved'));
var element = $('a.update');
element.addClass('success');