pid tuning got full i18n support

10.3.x-maintenance
cTn 2014-05-06 17:34:59 +02:00
parent 2162a2b9d3
commit eac97e1b59
3 changed files with 53 additions and 13 deletions

View File

@ -123,5 +123,45 @@
}, },
"defaultDonateText": { "defaultDonateText": {
"message": "This utility is fully <strong>open source</strong> and is available free of charge to all <strong>baseflight</strong> users.<br />If you found the utility useful, please consider <strong>supporting</strong> its development by donating." "message": "This utility is fully <strong>open source</strong> and is available free of charge to all <strong>baseflight</strong> users.<br />If you found the utility useful, please consider <strong>supporting</strong> its development by donating."
},
"pidTuningName": {
"message": "Name"
},
"pidTuningProportional": {
"message": "Proportional"
},
"pidTuningIntegral": {
"message": "Integral"
},
"pidTuningDerivative": {
"message": "Derivative"
},
"pidTuningRollPitchRate": {
"message": "ROLL &amp; PITCH rate"
},
"pidTuningYawRate": {
"message": "YAW rate"
},
"pidTuningTPA": {
"message": "TPA"
},
"pidTuningButtonSave": {
"message": "Save"
},
"pidTuningButtonRefresh": {
"message": "Refresh"
},
"pidTuningProfileHead": {
"message": "Profile"
},
"pidTuningLoadedProfile": {
"message": "Loaded Profile: <strong>$1</strong>"
},
"pidTuningDataRefreshed": {
"message": "PID data <strong>refreshed</strong>"
},
"pidTuningEepromSaved": {
"message": "EEPROM <span style=\"color: green\">saved</span>"
} }
} }

View File

@ -1,10 +1,10 @@
<div class="tab-pid_tuning"> <div class="tab-pid_tuning">
<table class="pid_tuning"> <table class="pid_tuning">
<tr> <tr>
<th class="name">Name</th> <th class="name" i18n="pidTuningName"></th>
<th class="proportional">Proportional</th> <th class="proportional" i18n="pidTuningProportional"></th>
<th class="integral">Integral</th> <th class="integral" i18n="pidTuningIntegral"></th>
<th class="derivative">Derivative</th> <th class="derivative" i18n="pidTuningDerivative"></th>
</tr> </tr>
<tr class="ROLL"><!-- 0 --> <tr class="ROLL"><!-- 0 -->
<td></td> <td></td>
@ -66,9 +66,9 @@
</table> </table>
<table class="rate-tpa"> <table class="rate-tpa">
<tr> <tr>
<th>ROLL &amp; PITCH rate</th> <th i18n="pidTuningRollPitchRate"></th>
<th>YAW rate</th> <th i18n="pidTuningYawRate"></th>
<th>TPA</th> <th i18n="pidTuningTPA"></th>
</tr> </tr>
<tr> <tr>
<td><input type="number" name="roll-pitch" step="0.01" min="0" max="2.55" /></td> <td><input type="number" name="roll-pitch" step="0.01" min="0" max="2.55" /></td>
@ -76,11 +76,11 @@
<td><input type="number" name="tpa" step="0.01" min="0" max="2.55" /></td> <td><input type="number" name="tpa" step="0.01" min="0" max="2.55" /></td>
</tr> </tr>
</table> </table>
<a class="update" href="#">Save</a> <a class="update" href="#" i18n="pidTuningButtonSave"></a>
<a class="refresh" href="#">Refresh</a> <a class="refresh" href="#" i18n="pidTuningButtonRefresh"></a>
<div class="clear-both"></div> <div class="clear-both"></div>
<div class="profile"> <div class="profile">
<span class="head">Profile</span> <span class="head" i18n="pidTuningProfileHead"></span>
<input type="number" name="profile" min="1" max="3" /> <input type="number" name="profile" min="1" max="3" />
</div> </div>
</div> </div>

View File

@ -181,7 +181,7 @@ function tab_initialize_pid_tuning() {
$('input[name="profile"]').change(function() { $('input[name="profile"]').change(function() {
var profile = parseInt($(this).val()); var profile = parseInt($(this).val());
send_message(MSP_codes.MSP_SELECT_SETTING, [profile - 1], false, function() { send_message(MSP_codes.MSP_SELECT_SETTING, [profile - 1], false, function() {
GUI.log('Loaded Profile: <strong>' + profile + '</strong>'); GUI.log(chrome.i18n.getMessage('pidTuningLoadedProfile', [profile]));
GUI.tab_switch_cleanup(tab_initialize_pid_tuning); GUI.tab_switch_cleanup(tab_initialize_pid_tuning);
}); });
@ -189,7 +189,7 @@ function tab_initialize_pid_tuning() {
$('a.refresh').click(function() { $('a.refresh').click(function() {
GUI.tab_switch_cleanup(function() { GUI.tab_switch_cleanup(function() {
GUI.log('PID data <strong>refreshed</strong>'); GUI.log(chrome.i18n.getMessage('pidTuningDataRefreshed'));
tab_initialize_pid_tuning(); tab_initialize_pid_tuning();
}); });
@ -299,7 +299,7 @@ function tab_initialize_pid_tuning() {
function save_to_eeprom() { function save_to_eeprom() {
send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>'); GUI.log(chrome.i18n.getMessage('pidTuningEepromSaved'));
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');