<commit_before>// =======================================================
// Inline Action Functions

// global var for which node path to edit
var edit_translation_id = null;

function edit_path(translation_id, lang_code, name, path) {
    edit_translation_id = translation_id;
    var parts = path.split('/');
    var slug = parts.pop();
    if( slug == '' ) 
        slug = parts.pop();

    $('#edit_path_form input#edit_path_lang').val(lang_code);
    $('#edit_path_form input#edit_path_name').val(name);
    $('#edit_path_form input#edit_path_slug').val(slug);
    $('#edit_path_dialog_warn').load("/yacon/nexus/edit_path_warn/" 
        + translation_id + "/");

    $('#edit_path_dialog').dialog('open');
}

// global var for which node path to remove
var remove_path_translation_id = null;

function remove_path(translation_id) {
    remove_path_translation_id = translation_id;
    var dialog = $('#remove_path_dialog');
    dialog.load("/yacon/nexus/remove_path_warn/" + translation_id + "/");
    dialog.dialog("open");
}

function remove_page_translation(page_id, title, has_alias) {
    if( has_alias == 'True' ) {
        action = confirm('Translation \"' + title + '" is aliased, are you '
            + 'sure you want to remove it?');
    }
    else {
        action = confirm('Remove translation \"' + title + '"?');
    }

    if( action ) {
        $.ajax({
            url: "/yacon/nexus/remove_page_translation/" + page_id + "/",
            dataType: "json",
            success: function(data) {
                refresh_tree();
            }
        });
    }
}

function edit_site(site_id, name, domain) {<commit_msg>- updated translation removal warning message for aliases metapages<commit_after>// =======================================================
// Inline Action Functions

// global var for which node path to edit
var edit_translation_id = null;

function edit_path(translation_id, lang_code, name, path) {
    edit_translation_id = translation_id;
    var parts = path.split('/');
    var slug = parts.pop();
    if( slug == '' ) 
        slug = parts.pop();

    $('#edit_path_form input#edit_path_lang').val(lang_code);
    $('#edit_path_form input#edit_path_name').val(name);
    $('#edit_path_form input#edit_path_slug').val(slug);
    $('#edit_path_dialog_warn').load("/yacon/nexus/edit_path_warn/" 
        + translation_id + "/");

    $('#edit_path_dialog').dialog('open');
}

// global var for which node path to remove
var remove_path_translation_id = null;

function remove_path(translation_id) {
    remove_path_translation_id = translation_id;
    var dialog = $('#remove_path_dialog');
    dialog.load("/yacon/nexus/remove_path_warn/" + translation_id + "/");
    dialog.dialog("open");
}

function remove_page_translation(page_id, title, has_alias) {
    if( has_alias == 'True' ) {
        action = confirm('Translation \"' + title + '" is aliased.  Removing '
            + 'the translation will automatically remove it from any aliases. '
            + 'Are you sure you want to remove it?');
    }
    else {
        action = confirm('Remove translation \"' + title + '"?');
    }

    if( action ) {
        $.ajax({
            url: "/yacon/nexus/remove_page_translation/" + page_id + "/",
            dataType: "json",
            success: function(data) {
                refresh_tree();
            }
        });
    }
}

function edit_site(site_id, name, domain) {
{'fraction_non_alphanumeric': 0.17240373395565928, 'fraction_numerical': 0.0, 'mean_word_length': 3.0579881656804733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5303268', 'n_tokens_mistral': 1037, 'n_tokens_neox': 1024, 'n_words': 222}