pre-enable i18n for all html content in tabs
parent
6a33801463
commit
2162a2b9d3
|
@ -13,6 +13,9 @@ function tab_initialize_auxiliary_configuration() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
function box_check(num, pos) {
|
||||
if (bit_check(num, pos)) { // 1
|
||||
return '<td><input type="checkbox" checked="checked" /></td>';
|
||||
|
|
|
@ -29,6 +29,9 @@ function tab_initialize_cli() {
|
|||
MSP.callbacks_cleanup();
|
||||
|
||||
$('#content').load("./tabs/cli.html", function() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
CLI_active = true;
|
||||
|
||||
// Enter CLI mode
|
||||
|
|
|
@ -6,6 +6,9 @@ function tab_initialize_firmware_flasher() {
|
|||
var parsed_hex = false; // parsed raw hex in array format
|
||||
|
||||
$('#content').load("./tabs/firmware_flasher.html", function() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
// UI Hooks
|
||||
$('a.load_file').click(function() {
|
||||
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: [{extensions: ['hex']}]}, function(fileEntry) {
|
||||
|
|
|
@ -9,6 +9,9 @@ function tab_initialize_gps () {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
function get_raw_gps_data() {
|
||||
send_message(MSP_codes.MSP_RAW_GPS, false, false, get_gpsvinfo_data);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ function tab_initialize_initial_setup() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
var yaw_fix = 0.0;
|
||||
|
||||
// Fill in misc stuff
|
||||
|
|
|
@ -13,6 +13,9 @@ function tab_initialize_motor_outputs() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
// if CAP_DYNBALANCE is true
|
||||
if (bit_check(CONFIG.capability, 2)) {
|
||||
$('div.motor_testing').show();
|
||||
|
|
|
@ -22,6 +22,9 @@ function tab_initialize_pid_tuning() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
// Fill in the names from PID_names array
|
||||
// this needs to be reworked, but will do for now
|
||||
$('.pid_tuning tr:eq(1) td:first').text(PID_names[0]);
|
||||
|
|
|
@ -13,6 +13,9 @@ function tab_initialize_receiver() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
// fill in data from RC_tuning
|
||||
$('.tunings .throttle input[name="mid"]').val(RC_tuning.throttle_MID.toFixed(2));
|
||||
$('.tunings .throttle input[name="expo"]').val(RC_tuning.throttle_EXPO.toFixed(2));
|
||||
|
|
|
@ -165,6 +165,9 @@ function tab_initialize_sensors() {
|
|||
}
|
||||
|
||||
$('#content').load("./tabs/sensors.html", function load_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
$('.tab-sensors .info .checkboxes input').change(function() {
|
||||
var enable = $(this).prop('checked');
|
||||
var index = $(this).parent().index();
|
||||
|
|
|
@ -24,6 +24,9 @@ function tab_initialize_servos() {
|
|||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
function process_directions(name, obj, bitpos) {
|
||||
$('div.direction_wrapper').show();
|
||||
|
||||
|
|
Loading…
Reference in New Issue