<commit_before>{% set title = "Translation tool :: Source and Target language" %}
{% set current_link = "home" %}
{% extends 'composers/translate/layout.html' %}


{% block body_content %}


    <script type="text/javascript">

    $(document).ready( function() {
        var numProposals = $("#proposals").find("option").length;

        if (numProposals == 0)
        {
            var submits = $("button[type=submit]");
            submits.attr("disabled", "disabled");
            submits.prop("disabled", true);
        }
    });

    </script>


    <div class="translateblock">
    <div class="row">
        <div class="col-lg-12">
            <div class="page-header">
                <h1 id="apptitle">Proposals for this App</h1>

                {% if app %}
                    <h2 id="appfullname">{{ app.name }}</h2>
                {% else %}
                    <h2 id="appfullname">[App name not available]</h2>
                {% endif %}

            </div>
        </div>
    </div>





    <!-- Forms
    ================================================== -->
    <div class="well">

        <div class="row">
            <div class="col-lg-12">
                <form class="form-horizontal" id="merge" name="merge"
                      action="#" method="POST">

                    {# This is necessary so that the next page knows which App to load. #}
                    <input type="hidden" name="appid" value="{{ app.unique_id }}"/>

                    <legend>Select a translation to decide what to do</legend>

                    <div class="col-lg-6 col-md-6">


                        <div class="form-group">
                            <label class="control-label" for="proposals">Select the translation ({{ proposals|length }})</label>

                            <select id="proposals" multiple="" name="proposals" class="form-control">

                                {% for proposal in proposals %}
                                <option value="{{ proposal["id"] }}">{{ proposal["from"] }}'s {{ proposal["bundle_code"] }} </option>
                                {% endfor %}

                            </select>
                        </div>


                        <div class="form-group">
                            <div class="controls">
                                <!--<span class="help-block">You want to translate the app from General English into Elementary School German.</span>-->
                                <a class="btn btn-default" id="backtoindexbtn"
                                   href="{{ url_for('translate.translate_selectlang', appid=app.unique_id) }}">« Go Back</a>

                                <button type="submit" id="acceptButton" name="acceptButton" class="btn btn-success">
                                    Accept it
                                </button>

                                <button type="submit" id="denyButton" name="denyButton" class="btn btn-warning">
                                    Deny it
                                </button>
                                <!--
                    <a class="btn btn-success" id="sendlangsbtn" href="{{ url_for('translate.translate_edit') }}">Step 3 - Translate »</a>
                    -->
                            </div>
                        </div>


                    </div>
                </form>

            </div>
        </div>
    </div>




{% endblock %}<commit_msg>[translate]: Minor improvements<commit_after>{% set title = "Translation tool :: Source and Target language" %}
{% set current_link = "home" %}
{% extends 'composers/translate/layout.html' %}


{% block body_content %}


    <script type="text/javascript">

    $(document).ready( function() {
        var options = $("#proposals").find("option");
        var numProposals = options.length;

        if (numProposals == 0)
        {
            var submits = $("button[type=submit]");
            submits.attr("disabled", "disabled");
            submits.prop("disabled", true);
        }
        else
        {
            $(options[0]).attr("selected", "selected");
        }
    });

    </script>


    <div class="translateblock">
    <div class="row">
        <div class="col-lg-12">
            <div class="page-header">
                <h1 id="apptitle">Proposals for this App</h1>

                {% if app %}
                    <h2 id="appfullname">{{ app.name }}</h2>
                {% else %}
                    <h2 id="appfullname">[App name not available]</h2>
                {% endif %}

            </div>
        </div>
    </div>





    <!-- Forms
    ================================================== -->
    <div class="well">

        <div class="row">
            <div class="col-lg-12">
                <form class="form-horizontal" id="merge" name="merge"
                      action="#" method="POST">

                    {# This is necessary so that the next page knows which App to load. #}
                    <input type="hidden" name="appid" value="{{ app.unique_id }}"/>

                    <legend>Select a translation to decide what to do</legend>

                    <div class="col-lg-6 col-md-6">


                        <div class="form-group">
                            <label class="control-label" for="proposals">Select the translation ({{ proposals|length }})</label>

                            <select id="proposals" multiple="" name="proposals" class="form-control">

                                {% for proposal in proposals %}
                                <option value="{{ proposal["id"] }}">{{ proposal["from"] }}'s {{ proposal["bundle_code"] }} </option>
                                {% endfor %}

                            </select>
                        </div>


                        <div class="form-group">
                            <div class="controls">
                                <!--<span class="help-block">You want to translate the app from General English into Elementary School German.</span>-->
                                <a class="btn btn-default" id="backtoindexbtn"
                                   href="{{ url_for('translate.translate_selectlang', appid=app.unique_id) }}">« Go Back</a>

                                <button type="submit" id="acceptButton" name="acceptButton" class="btn btn-success">
                                    Accept it
                                </button>

                                <button type="submit" id="denyButton" name="denyButton" class="btn btn-warning">
                                    Deny it
                                </button>
                                <!--
                    <a class="btn btn-success" id="sendlangsbtn" href="{{ url_for('translate.translate_edit') }}">Step 3 - Translate »</a>
                    -->
                            </div>
                        </div>


                    </div>
                </form>

            </div>



        

        </div>
    </div>




{% endblock %}
{'fraction_non_alphanumeric': 0.1557760453579022, 'fraction_numerical': 0.004110559886605245, 'mean_word_length': 1.298371335504886, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4151845', 'n_tokens_mistral': 1877, 'n_tokens_neox': 1675, 'n_words': 404}