pre-enable i18n for all html content in tabs

10.3.x-maintenance
cTn 2014-05-06 16:48:46 +02:00
parent 6a33801463
commit 2162a2b9d3
10 changed files with 30 additions and 0 deletions

View File

@ -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>';

View File

@ -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

View File

@ -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) {

View File

@ -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);
}

View File

@ -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

View File

@ -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();

View File

@ -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]);

View File

@ -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));

View File

@ -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();

View File

@ -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();