<commit_before>{% load i18n %}
{% load static from staticfiles %}
<script id="template-election_form" type="text/underscore-template">
    <h1>{% trans "Create election" %}</h1>
    <form>
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#election-tab"  data-toggle="tab">{% trans "Election" %}</a>
            </li>
            <li>
                <a href="#" data-toggle="tab">{% trans "Question #1" %}</a>
            </li>
            <li>
                <a href="#" data-toggle="tab">{% trans "Question #2" %}</a>
            </li>
            <li><a href="#add-question-tab" data-toggle="tab"><i class="icon-plus"></i> {% trans "Add question" %}</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="election-tab">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="name">{% trans "Name" %}</label>
                        <div class="controls">
                            <textarea rows="1" class="input-xxlarge" id="name" placeholder="{% trans "Election name" %}"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="description">{% trans "Description" %}</label>
                        <div class="controls">
                            <textarea rows="3" class="input-xxlarge" id="description" placeholder="{% trans "Election description (optional)" %}"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label radio">
                            <input type="radio" name="is_vote_secret" id="is_vote_secret_yes" value="secret" checked />
                            <p>{% trans "Allow voting in secret" %}</p>
                        </label>
                        <label class="radio">
                            <input type="radio" name="is_vote_secret" id="is_vote_secret_no" value="public" />
                            <p>{% trans "All votes are public" %}</p>
                        </label>
                    </div>
                    <div class="control-group spaced-up-control">
                        <label class="control-label checkbox">
                            <input type="checkbox" name="schedule_voting" id="schedule_voting" />
                            <p>{% trans "Schedule start/end voting period" %} <i>({% trans "Optional" %})</i></p>
                        </label>
                        <div class="control-group sub-group-control hide" id="schedule_voting_controls">
                            <div class="input-prepend inline">
                                <span class="add-on"><i class="icon-calendar"></i></span>
                                <input class="span2 datetimepicker" id="start_voting_date" type="text" placeholder="{% trans "Start voting at.." %}" /> -
                            </div>
                            <div class="input-append inline">
                                <input class="span2 datetimepicker" id="end_voting_date" type="text" placeholder="{% trans "End voting at.." %}" />
                                <span class="add-on"><i class="icon-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="control-group spaced-up-control">
                        <button class="btn btn-large btn-block btn-primary add-question" type="button">
                            {% trans "Add question" %}
                        </button>
                        <button class="hide btn btn-large btn-block btn-success add-question" type="button">
                            {% trans "Create election" %}
                        </button>
                    </div>
                </fieldset>
            </div>
            <div class="tab-pane" id="add-question-tab">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="name">{% trans "Question text" %}</label>
                        <div class="controls">
                            <textarea rows="1" class="input-xxlarge" id="name" placeholder="{% trans "Question text" %}"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name">{% trans "Voting system" %}</label>
                        <div class="controls">
                            <div class="btn-group">
                                <a class="btn btn-block dropdown-toggle" data-toggle="dropdown" href="#">
                                <div class="current-item inline" data-id="ONE_CHOICE">{% trans "Classic vote (Plurality)" %}</div>
                                <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu complete-block">
                                    <li data-id="ONE_CHOICE" data-usertext="{% trans "Classic vote (Plurality)" %}">
                                    <a href="#"><div class="row-fluid">
                                        <div class="span3">
                                            <img src="{% static 'img/plurality_ballot.png' %}"/>
                                        </div>
                                        <div class="span9">
                                            <h3>{% trans "Classic vote" %}</h3>
                                            <p>{% trans "Each <strong>voter chooses only one candidate</strong> and the candidate with more votes wins." %}
                                            </p>
                                            <p><strong>{% trans "Technical name" %}</strong>: {% trans "Plurality" %}</p>
                                        </div>
                                    </div></a></li>
                                    <li class="divider"></li>
                                    <li data-id="MEEK-STV" data-usertext="{% trans "Elect a list (Meek-STV)" %}">
                                    <a href="#"><div class="row-fluid">
                                        <div class="span3">
                                            <img src="{% static 'img/preferential_ballot.png' %}"/>
                                        </div>
                                        <div class="span9">
                                            <h3>{% trans "Elect a list" %}</h3>
                                            <p>{% trans "Each <strong>voter choose a ranked list of candidates</strong>. This method allows to elect a list of winners.</p>" %}

                                            {% trans "<p>Under Single Transferable Vote, an elector has a single vote that is initially allocated to his most preferred candidate, and then, as the count proceeds and candidates are either elected or eliminated, the <strong>vote is transferred to other candidates</strong> according to the voter's stated preferences." %}
                                            </p>
                                            <p><strong>{% trans "Technical name" %}</strong>: {% trans "Single Transferable Vote - Meek's method (Meek-STV)" %}</p>
                                        </div>
                                    </div></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label inline" for="num_winners">{% trans "Elect a list of" %}</label>
                        <input type="text" name="num_winners" maxlength="3" value="1" id="num_winners" class="inline input-nano"/>
                        {% trans "winners" %}.
                        <label class="control-label inline" for="min_num_choices">{% trans "A voter selects from" %}</label>
                        <input type="text" name="min_num_choices" value="0" maxlength="3" id="min_num_choices" class="inline input-nano"/>
                        <label class="control-label inline" for="max_num_choices">{% trans "to" %}</label>
                        <input type="text" name="max_num_choices" maxlength="3" value="99" id="max_num_choices" class="inline input-nano"/>
                        {% trans "choices" %}.
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name">{% trans "Choice" %}</label>
                        <div class="input-append">
                            <input id="add_option" type="text" placeholder="{% trans "Add a choice" %}">
                            <button class="btn btn-primary" type="button"><i class="icon-plus icon-white"></i></button>
                        </div>
                        <table class="table well">
                            <tbody class="option-list">
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #1
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #2
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #3
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="control-group spaced-up-control">
                        <button class="btn btn-large btn-block add-question" type="button">
                            {% trans "Remove question" %}
                        </button>
                    </div>
                </fieldset>
            </div>
        </div>
    </form>
    <link rel="stylesheet" href="{% static 'css/jquery-ui.css' %}" type="text/css" />

    <style type="text/css">
    /* css for timepicker */
    .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
    .ui-timepicker-div dl { text-align: left; }
    .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
    .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
    .ui-timepicker-div td { font-size: 90%; }
    .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
    .ui_tpicker_timezone select { max-width: 170px; }
    </style>
</script><commit_msg>i18n of election form done in client now<commit_after>{% load i18n %}
{% load static from staticfiles %}
<script id="template-election_form" type="text/underscore-template">
    <h1><%= gettext("Create election") %></h1>
    <form>
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#election-tab"  data-toggle="tab"><%= gettext("Election") %></a>
            </li>
            <li>
                <a href="#" data-toggle="tab"><%= gettext("Question #1") %></a>
            </li>
            <li>
                <a href="#" data-toggle="tab"><%= gettext("Question #2") %></a>
            </li>
            <li><a href="#add-question-tab" data-toggle="tab"><i class="icon-plus"></i> <%= gettext("Add question") %></a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="election-tab">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="name"><%= gettext("Name") %></label>
                        <div class="controls">
                            <textarea rows="1" class="input-xxlarge" id="name" placeholder="<%= gettext("Election name") %>"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="description"><%= gettext("Description") %></label>
                        <div class="controls">
                            <textarea rows="3" class="input-xxlarge" id="description" placeholder="<%= gettext("Election description (optional)") %>"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label radio">
                            <input type="radio" name="is_vote_secret" id="is_vote_secret_yes" value="secret" checked />
                            <p><%= gettext("Allow voting in secret") %></p>
                        </label>
                        <label class="radio">
                            <input type="radio" name="is_vote_secret" id="is_vote_secret_no" value="public" />
                            <p><%= gettext("All votes are public") %></p>
                        </label>
                    </div>
                    <div class="control-group spaced-up-control">
                        <label class="control-label checkbox">
                            <input type="checkbox" name="schedule_voting" id="schedule_voting" />
                            <p><%= gettext("Schedule start/end voting period") %> <i>(<%= gettext("Optional") %>)</i></p>
                        </label>
                        <div class="control-group sub-group-control hide" id="schedule_voting_controls">
                            <div class="input-prepend inline">
                                <span class="add-on"><i class="icon-calendar"></i></span>
                                <input class="span2 datetimepicker" id="start_voting_date" type="text" placeholder="<%= gettext("Start voting at..") %>" /> -
                            </div>
                            <div class="input-append inline">
                                <input class="span2 datetimepicker" id="end_voting_date" type="text" placeholder="<%= gettext("End voting at..") %>" />
                                <span class="add-on"><i class="icon-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="control-group spaced-up-control">
                        <button class="btn btn-large btn-block btn-primary add-question" type="button">
                            <%= gettext("Add question") %>
                        </button>
                        <button class="hide btn btn-large btn-block btn-success add-question" type="button">
                            <%= gettext("Create election") %>
                        </button>
                    </div>
                </fieldset>
            </div>
            <div class="tab-pane" id="add-question-tab">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="name"><%= gettext("Question text") %></label>
                        <div class="controls">
                            <textarea rows="1" class="input-xxlarge" id="name" placeholder="<%= gettext("Question text") %>"></textarea>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name"><%= gettext("Voting system") %></label>
                        <div class="controls">
                            <div class="btn-group">
                                <a class="btn btn-block dropdown-toggle" data-toggle="dropdown" href="#">
                                <div class="current-item inline" data-id="ONE_CHOICE"><%= gettext("Classic vote (Plurality)") %></div>
                                <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu complete-block">
                                    <li data-id="ONE_CHOICE" data-usertext="<%= gettext("Classic vote (Plurality)") %>">
                                    <a href="#"><div class="row-fluid">
                                        <div class="span3">
                                            <img src="{% static 'img/plurality_ballot.png' %}"/>
                                        </div>
                                        <div class="span9">
                                            <h3><%= gettext("Classic vote") %></h3>
                                            <p><%= gettext("Each <strong>voter chooses only one candidate</strong> and the candidate with more votes wins.") %>
                                            </p>
                                            <p><strong><%= gettext("Technical name") %></strong>: <%= gettext("Plurality") %></p>
                                        </div>
                                    </div></a></li>
                                    <li class="divider"></li>
                                    <li data-id="MEEK-STV" data-usertext="<%= gettext("Elect a list (Meek-STV)") %>">
                                    <a href="#"><div class="row-fluid">
                                        <div class="span3">
                                            <img src="{% static 'img/preferential_ballot.png' %}"/>
                                        </div>
                                        <div class="span9">
                                            <h3><%= gettext("Elect a list") %></h3>
                                            <p><%= gettext("Each <strong>voter choose a ranked list of candidates</strong>. This method allows to elect a list of winners.") %></p>

                                            <p><%= gettext("Under Single Transferable Vote, an elector has a single vote that is initially allocated to his most preferred candidate, and then, as the count proceeds and candidates are either elected or eliminated, the <strong>vote is transferred to other candidates</strong> according to the voter's stated preferences.") %>
                                            </p>
                                            <p><strong><%= gettext("Technical name") %></strong>: <%= gettext("Single Transferable Vote - Meek's method (Meek-STV)") %></p>
                                        </div>
                                    </div></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label inline" for="num_winners"><%= gettext("Elect a list of") %></label>
                        <input type="text" name="num_winners" maxlength="3" value="1" id="num_winners" class="inline input-nano"/>
                        <%= gettext("winners") %>.
                        <label class="control-label inline" for="min_num_choices"><%= gettext("A voter selects from") %></label>
                        <input type="text" name="min_num_choices" value="0" maxlength="3" id="min_num_choices" class="inline input-nano"/>
                        <label class="control-label inline" for="max_num_choices"><%= gettext("to") %></label>
                        <input type="text" name="max_num_choices" maxlength="3" value="99" id="max_num_choices" class="inline input-nano"/>
                        <%= gettext("choices") %>.
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name"><%= gettext("Choices") %></label>
                        <div class="input-append">
                            <input id="add_option" type="text" placeholder="<%= gettext("Add a choice") %>">
                            <button class="btn btn-primary" type="button"><i class="icon-plus icon-white"></i></button>
                        </div>
                        <table class="table well">
                            <tbody class="option-list">
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #1
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #2
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <a href="#" class="option-edit">
                                            Option #3
                                            <i class="icon-pencil"></i>
                                        </a>
                                    <td>
                                        <div class="text-right">
                                            <a href="#">
                                                <i class="icon-remove"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="control-group spaced-up-control">
                        <button class="btn btn-large btn-block add-question" type="button">
                            <%= gettext("Remove question") %>
                        </button>
                    </div>
                </fieldset>
            </div>
        </div>
    </form>
    <link rel="stylesheet" href="{% static 'css/jquery-ui.css' %}" type="text/css" />

    <style type="text/css">
    /* css for timepicker */
    .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
    .ui-timepicker-div dl { text-align: left; }
    .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
    .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
    .ui-timepicker-div td { font-size: 90%; }
    .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
    .ui_tpicker_timezone select { max-width: 170px; }
    </style>
</script>
{'fraction_non_alphanumeric': 0.13453237410071942, 'fraction_numerical': 0.003916866506794564, 'mean_word_length': 0.9766945805024491, 'pattern_counts': {'":': 0, '<': 533, '<?xml version=': 0, '>': 533, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 200, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5396600', 'n_tokens_mistral': 5841, 'n_tokens_neox': 5410, 'n_words': 1326}