Skip to content

Commit

Permalink
Merge pull request #27 from Villanueva-del-Trabuco-EGC/interfaz-trad/…
Browse files Browse the repository at this point in the history
…framigdom

[DES] Interfaz traducible actualizada.
  • Loading branch information
Dr-Vell authored Dec 3, 2022
2 parents b471e7e + f67feeb commit 7b201df
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 39 deletions.
16 changes: 14 additions & 2 deletions decide/authentication/locale/en_US/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "registrar"
msgid "register"
msgstr "Registration"

msgid "infoRegistrar"
Expand All @@ -33,4 +33,16 @@ msgid "email"
msgstr "Email"

msgid "password"
msgstr "Password"
msgstr "Password"

msgid "acceptRegister"
msgstr "By registering, you accept the"

msgid "terms"
msgstr "Terms & Privacy"

msgid "alreadyAccount"
msgstr "Already have an account?"

msgid "sign"
msgstr "Sign In"
6 changes: 3 additions & 3 deletions decide/authentication/templates/authentication/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ <h1>{% trans "registrar" %}:</h1>
</div>
</div>

<p>By registering, you accept the <a href="#">Terms & Privacy</a>.</p>
<p>{% trans "acceptRegister" %}<a href="#">{% trans "terms" %}</a>.</p>

<div class="form-group">
<button class="registerbtn" type="submit">Register</button>
<button class="registerbtn" type="submit">{% trans "registrar" %}</button>
</div>
<div class="container signin">
<p>Already have an account? <a href="/">Sign In</a></p>
<p>{% trans "alreadyAccount" %}<a href="/">{% trans "sign" %}</a></p>
</div>
</form>
</div>
Expand Down
9 changes: 1 addition & 8 deletions decide/base/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@
</head>
<body>
{% block content %}
<div class="btn-group btn-group-toggle" style="float:right; padding-right:20px;" data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="options" id="option1" autocomplete="off" checked> Español
</label>
<label class="btn btn-secondary">
<input type="radio" name="options" id="option2" autocomplete="off"> Ingles
</label>
</div>

{% endblock %}

{% block extrabody %}{% endblock %}
Expand Down
6 changes: 3 additions & 3 deletions decide/booth/templates/booth/booth.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ <h3>{% trans "vName" %}: [[ voting.name ]]</h3>

{% if not user.is_authenticated and not user.is_staff %}
<a href="{% url 'social:begin' 'github' %}?next={{ request.path }}" class="btn btn-secondary">
<span>Login with GitHub</span>
<span>{% trans "LoginGitHub" %}</span>
</a>
{% elif not user.is_staff %}
<p>Registrado en {{user.social_auth.get.provider}} como {{user}}</p>
<p>{% trans "register_as_1" %}{{user.social_auth.get.provider}} {% trans "register_as_2" %} {{user}}</p>
<b-button type="button" variant="primary" v-if="signup" v-on:click="getSocialAuthUser">
Vote with {{user.social_auth.get.provider}}
{% trans "vote_with" %} {{user.social_auth.get.provider}}
</b-button>
{% endif %}

Expand Down
12 changes: 6 additions & 6 deletions decide/booth/templates/booth/votings.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Votación</th>
<th scope="col">Enlace a la votación</th>
<th scope="col">Enlace al censo</th>
<th scope="col">{% trans "voting" %}</th>
<th scope="col">{% trans "link_voting" %}</th>
<th scope="col">{% trans "link_census" %}</th>
</tr>
</thead>
<tbody>
Expand All @@ -27,11 +27,11 @@
<th scope="row">{{voting.id}}</th>
<td>{{voting.name}}</td>
{% if voting.end_date == None %}
<td><a href="/booth/{{voting.id}}"><p>Booth votación {{voting.id}}</p></a></td>
<td><a href="/booth/{{voting.id}}"><p>{% trans "booth_voting" %} {{voting.id}}</p></a></td>
{% else %}
<td><p>Votación cerrada</p></td>
<td><p>{% trans "closed_voting" %}</p></td>
{% endif %}
<td><a href="/census/export/{{voting.id}}"><p>Censo votación {{voting.id}}</p></a></td>
<td><a href="/census/export/{{voting.id}}"><p>{% trans "voting_census" %} {{voting.id}}</p></a></td>
</tr>
{% endfor %}
</tbody>
Expand Down
12 changes: 6 additions & 6 deletions decide/census/templates/census/census.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
<div id="app-census">
<!-- Navbar -->
<b-navbar type="dark" variant="secondary">
<b-navbar-brand tag="h1">Decide</b-navbar-brand>
<b-navbar-brand tag="h1">{% trans "decide" %}</b-navbar-brand>
</b-navbar>


<!-- IMPORT -->

<div class="manage-container">
<h2> Administración de censos en votaciones</h2>
<h2> {% trans "administration_census" %}</h2>

<form method="POST" enctype="multipart/form-data">

<label for="votation">¿A qué votación quieres añadir el censo?</label>
<label for="votation">{% trans "add_census_question" %}</label>
<input id="votation" type="text" name="votation">
<br>

<label for="file">Selecciona el archivo desde el que deseas importar tu censo</label>
<label for="file">{% trans "select_file" %}</label>
<input type="file" name="file">
<br>

<label for="user">Introduzca el usuario administrador que importará el censo</label>
<label for="user">{% trans "input_user_admin" %}</label>
<input type="text" name="user">
<br>

<label for="password">Introduzca la contraseña del usuario administrador</label>
<label for="password">{% trans "input_user_admin_password" %}</label>
<input type="password" name="password">

<br>
Expand Down
22 changes: 11 additions & 11 deletions decide/visualizer/templates/visualizer/visualizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@
<h1>{% trans "vID" %}: [[ voting.id ]] </h1>
<h3>{% trans "vName" %}: [[ voting.name ]]</h3>

<h3>Descripción de la votación: [[ voting.desc ]]</h2>
<h3>Fecha de inicio de la votación: [[ startDate ]]</h3>
<h3>{% trans "desc" %}: [[ voting.desc ]]</h2>
<h3>{% trans "startDate" %}: [[ startDate ]]</h3>

<h2 v-if="!voting.start_date">{% trans "nonstarted" %}</h2>
<h2 v-else-if="!voting.end_date">{% trans "running" %}</h2>
<div v-else>
<h3>Fecha de fin de la votación: [[ endDate ]]</h3>
<h3>{% trans "endDate" %}: [[ endDate ]]</h3>
<br>
<h2 class="heading"> {% trans "results" %}</h2>

<div v-if="voting.ecaños!=0">
<h3>Número de escaños a repartir: [[ voting.seats ]]</h3>
<h3>Porcentaje mínimo para tener representación: [[ voting.min_percentage_representation ]]% de los votos totales</h3>
<p> El cálculo en el reparto de escaños esta basado en la Ley D'Hont, en la cual se ignoran las candidaturas con menos del mínimo porcentaje necesario de votos totales, además en caso de empate en el reparto de un escaño, este será dado al candidato con más votos totales obtenidos</p>
<h3>{% trans "seatsNum" %}: [[ voting.seats ]]</h3>
<h3>{% trans "minPercentage_1" %}: [[ voting.min_percentage_representation ]]% {% trans "minPercentage_2" %}</h3>
<p> {% trans "hontDes" %}</p>
</div>

<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{% trans "option" %}</th>
<th v-if="voting.escaños!=0">Escaños</th>
<th v-if="voting.escaños!=0">{% trans "seats" %}</th>
<th v-if="voting.escaños==0">{% trans "points" %}</th>
<th>{% trans "votes" %}</th>
</tr>
Expand All @@ -70,15 +70,15 @@ <h3>Porcentaje mínimo para tener representación: [[ voting.min_percentage_repr
</div>
</br>
<div>
<h2 id="graphs_title" class="heading">Gráficas de la votación:</h2>
<h2 id="graphs_title" class="heading">{% trans "graph_info" %}:</h2>

<div class="chart-container" style="position: relative; height:40vh; width:80vw">

<h5 id="graph_title_1">Gráfica de votos</h5>
<h5 id="graph_title_1">{% trans "graph_votes" %}</h5>
<canvas id="Graph1"></canvas>
<h5 id="graph_title_2">Gráfica de escaños</h5>
<h5 id="graph_title_2">{% trans "graph_seats" %}</h5>
<canvas id="Graph2"></canvas>
<h5 id="graph_title_3">Gráfica de porcentaje de representación</h5>
<h5 id="graph_title_3">{% trans "graph_percentage" %}</h5>
<canvas id="Graph3"></canvas>

</div>
Expand Down

0 comments on commit 7b201df

Please sign in to comment.