[chronojump-server] Adding translations to chronojumpserver - Using english as base language - Override for test the lan
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Adding translations to chronojumpserver - Using english as base language - Override for test the lan
- Date: Sun, 18 Mar 2018 20:46:26 +0000 (UTC)
commit 23c7ca38849f6fed09597f5dfd881a642cbc38f4
Author: Marcos Venteo <mventeo gmail com>
Date: Sun Mar 18 21:45:54 2018 +0100
Adding translations to chronojumpserver
- Using english as base language
- Override for test the language to catalan
- Login, Index and Results(90%) page ready for translation
chronojumpserver/__init__.py | 22 +++
chronojumpserver/babel.cfg | 3 +
chronojumpserver/forms.py | 5 +-
chronojumpserver/templates/index.html | 14 +-
chronojumpserver/templates/layout.html | 10 +-
chronojumpserver/templates/login.html | 4 +-
chronojumpserver/templates/results.html | 57 ++++---
.../translations/ca/LC_MESSAGES/messages.po | 162 +++++++++++++++++++
.../translations/es/LC_MESSAGES/messages.po | 163 ++++++++++++++++++++
chronojumpserver/views.py | 3 +
requirements.txt | 1 +
11 files changed, 404 insertions(+), 40 deletions(-)
---
diff --git a/chronojumpserver/__init__.py b/chronojumpserver/__init__.py
index b8e8e9e..af5b95b 100755
--- a/chronojumpserver/__init__.py
+++ b/chronojumpserver/__init__.py
@@ -6,6 +6,7 @@ Chronojump Server Main application...
import click
from flask import Flask, send_from_directory
from flask_login import LoginManager
+from flask_babel import Babel, refresh, gettext
import ConfigParser
import os
@@ -15,8 +16,10 @@ config = ConfigParser.ConfigParser()
config.read('/etc/chronojump.conf')
+
app = Flask(__name__)
+
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = "login"
@@ -31,7 +34,10 @@ app.secret_key = config.get("security", "secret_key")
app.config['SECRET_KEY'] = app.secret_key
app.config['UPLOAD_FOLDER'] = config.get("api", "photos_dir")
app.config['MONO_PATH'] = config.get("api", "mono_executables_dir")
+app.config['BABEL_DEFAULT_LOCALE'] = 'es'
+app.config['BABEL_DEFAULT_TIMEZONE'] = 'UTC'
+babel = Babel(app, default_locale='es')
# Check if the UPLOAD_FOLDER exists
_path = os.path.join('chronojumpserver', app.config['UPLOAD_FOLDER'] )
@@ -97,3 +103,19 @@ from chronojumpserver.models import User
@login_manager.user_loader
def load_user(user_id):
return User.get(user_id)
+
+@babel.localeselector
+def get_locale():
+ #return request.accept_languages.best_match(['en','ca','es'])
+ return 'ca'
+
+from jinja2 import evalcontextfilter, Markup
+
+#Mind the hack! Babel does not work well within js code
+@app.template_filter()
+@evalcontextfilter
+def generate_string(eval_ctx, localized_value):
+ if localized_value is None:
+ return ""
+ else:
+ return Markup("\"" + localized_value + "\"").unescape()
diff --git a/chronojumpserver/babel.cfg b/chronojumpserver/babel.cfg
new file mode 100644
index 0000000..f0234b3
--- /dev/null
+++ b/chronojumpserver/babel.cfg
@@ -0,0 +1,3 @@
+[python: **.py]
+[jinja2: **/templates/**.html]
+extensions=jinja2.ext.autoescape,jinja2.ext.with_
diff --git a/chronojumpserver/forms.py b/chronojumpserver/forms.py
index ebb8bdb..0b7a3ab 100755
--- a/chronojumpserver/forms.py
+++ b/chronojumpserver/forms.py
@@ -3,6 +3,7 @@ from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired
from wtforms import BooleanField, FloatField, StringField, PasswordField, validators
from wtforms.validators import DataRequired, Length
+from flask_babel import gettext, lazy_gettext
@@ -15,6 +16,6 @@ class PersonForm(FlaskForm):
class LoginForm(FlaskForm):
- username = StringField('Usuari', validators=[DataRequired('El usuari és obligatori!'.decode('utf-8'))])
- password = PasswordField('Contrasenya', validators=[DataRequired('La Contrasenya és
obligatoria!'.decode('utf-8'))])
+ username = StringField(lazy_gettext('User'), validators=[DataRequired(lazy_gettext('Username is
required'))])
+ password = PasswordField(lazy_gettext('Password'), validators=[DataRequired(lazy_gettext('Password is
required'))])
pass
diff --git a/chronojumpserver/templates/index.html b/chronojumpserver/templates/index.html
index 5aff6c0..11dca5c 100755
--- a/chronojumpserver/templates/index.html
+++ b/chronojumpserver/templates/index.html
@@ -24,18 +24,18 @@
{% endif %}
</div>
<div class="col-md-offset-6 col-md-6">
- <h2 class="text-center text-uppercase">Opcions</h2>
+ <h2 class="text-center text-uppercase">{{_('Options')}}</h2>
</div>
<div class="col-md-6" >
<img src="{{url_for('static', filename='images/logo_club.png')}}" class="img-responsive
center-block" width="200px"/>
</div>
<div class="col-md-6">
- <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_results')}}">Resultats</a>
- <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_sprints')}}">Sprints</a>
- <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_players')}}">Llistat jugadors</a>
- <a class="btn btn-primary btn-lg btn-block" href="{{
url_for('show_stations')}}">Estacions/Exercisis</a>
+ <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_results')}}">{{_('Results')}}</a>
+ <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_sprints')}}">{{_('Sprints')}}</a>
+ <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('show_players')}}">{{_('Player
list')}}</a>
+ <a class="btn btn-primary btn-lg btn-block" href="{{
url_for('show_stations')}}">{{_('Stations/Exercices')}}</a>
{% if current_user.is_authenticated %}
- <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('logout')}}">Sortir i tancar
sessió</a>
+ <a class="btn btn-primary btn-lg btn-block" href="{{ url_for('logout')}}">{{_('Close and leave
session')}}</a>
{% endif %}
</div>
</div>
@@ -44,7 +44,7 @@
{% block footer %}
<nav class="navbar navbar-default navbar-fixed-bottom footer">
<div class="container-fluid">
- <p class="navbar-text navbar-left">Chronojump server és un servei ofert per Chronojump Boscosystem
®</p>
+ <p class="navbar-text navbar-left">{{_('Chronojump server is a product from Chronojump Boscosystem
®')}}</p>
</div>
</nav>
{% endblock %}
diff --git a/chronojumpserver/templates/layout.html b/chronojumpserver/templates/layout.html
index eeaa820..f40e4cd 100755
--- a/chronojumpserver/templates/layout.html
+++ b/chronojumpserver/templates/layout.html
@@ -30,12 +30,12 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="/">Inici</a></li>
- <li><a href="{{ url_for('show_results')}}">Resultats</a></li>
- <li><a href="{{ url_for('show_sprints')}}">Sprints</a></li>
- <li><a href="{{ url_for('show_players')}}">Llistat Jugadors</a></li>
- <li><a href="{{ url_for('show_stations')}}">Estacions/Exercisis</a></li>
+ <li><a href="{{ url_for('show_results')}}">{{_('Resultats')}}</a></li>
+ <li><a href="{{ url_for('show_sprints')}}">{{_('Sprints')}}</a></li>
+ <li><a href="{{ url_for('show_players')}}">{{_('Player list')}}</a></li>
+ <li><a href="{{ url_for('show_stations')}}">{{_('Stations/Exercices')}}</a></li>
{% if current_user.is_authenticated %}
- <li><a href="{{ url_for('logout')}}">Tancar sessió</a></li>
+ <li><a href="{{ url_for('logout')}}">{{_('Leave session')}}</a></li>
{% endif %}
</ul>
</div>
diff --git a/chronojumpserver/templates/login.html b/chronojumpserver/templates/login.html
index 07c7c97..3ed2c08 100755
--- a/chronojumpserver/templates/login.html
+++ b/chronojumpserver/templates/login.html
@@ -20,10 +20,10 @@
<form method="post" enctype="multipart/form-data">
{{ form.csrf_token }}
- <p class="text-center">Introdueix el teu usuari i contrasenya</p>
+ <p class="text-center">{{_('Enter your user and password')}}</p>
{{ render_field(form.username)}}
{{ render_field(form.password)}}
- <button class="btn btn-primary btn-block" type="submit">Accedir</button>
+ <button class="btn btn-primary btn-block" type="submit">{{_('Login')}}</button>
</form>
</div>
</div>
diff --git a/chronojumpserver/templates/results.html b/chronojumpserver/templates/results.html
index 46e2168..07c3f29 100755
--- a/chronojumpserver/templates/results.html
+++ b/chronojumpserver/templates/results.html
@@ -9,7 +9,7 @@
{% block content %}
<div class="page-header">
- <h1>Resultats</h1>
+ <h1>{{_('Results')}}</h1>
</div>
<div id="resultsFilter" class="row">
@@ -27,21 +27,21 @@
<input type="radio" name="filterByDayOptions" id="filterByDay4" value="14">14d
</label>
<label class="radio-inline dayfilter" style="margin-top:5px">
- <input type="radio" name="filterByDayOptions" id="filterByDay5" value="all"
checked>Tots
+ <input type="radio" name="filterByDayOptions" id="filterByDay5" value="all"
checked>{{_('All')}}
</label>
</div>
<div class="col-sm-6">
<div class="row" style="margin-left: -50px">
<div class="col-sm-4">
- <label for="player_filter" class="sr-only">Per Jugador</label>
+ <label for="player_filter" class="sr-only">{{_('By player')}}</label>
<div id="filterByPlayer"></div>
</div>
<div class="col-sm-4">
- <label for="fullname_filter" class="sr-only">Per Estació</label>
+ <label for="fullname_filter" class="sr-only">{{_('By station')}}</label>
<div id="filterByStation"></div>
</div>
<div class="col-sm-4">
- <label for="fullname_filter" class="sr-only">Per Exercici</label>
+ <label for="fullname_filter" class="sr-only">{{_('By exercice')}}</label>
<div id="filterByExercice"></div>
</div>
</div>
@@ -138,7 +138,7 @@ $(document).ready(function() {
},
{
type: "customdate",
- title: "Data",
+ title: {{gettext('Date')|generate_string|safe}},
data: "dt",
render: function(value) {
@@ -172,17 +172,17 @@ $(document).ready(function() {
{
type: "html",
data: "personName",
- title: "Jugador"
+ title: {{gettext('Player')|generate_string|safe}}
},
{
type: "html",
data: "stationName",
- title: "Estació"
+ title: {{gettext('Station')|generate_string|safe}}
},
{
type: "html",
data: "exerciseName",
- title: "Exercici"
+ title: {{gettext('Exercice')|generate_string|safe}}
},
{
type: "html",
@@ -191,7 +191,7 @@ $(document).ready(function() {
},
{
type: "num",
- title: "Càrrega",
+ title: {{gettext('Load')|generate_string|safe}},
data: "resistance",
render: $.fn.dataTable.render.number('', ',', 2)
},
@@ -203,7 +203,7 @@ $(document).ready(function() {
{
type: "num",
data: "lossByPower",
- title: "Pèrdua"
+ title: {{gettext('Loss')|generate_string|safe}}
},
{
type: "num",
@@ -249,10 +249,18 @@ $(document).ready(function() {
],
"dom": "<'row'<'resultsFilter'>><'row'<'col-sm-6'B><'col-sm-6'f>>rtip",
buttons: [
- { text: "Exportar resultats", className: "btn btn-primary",
+ { text: {{gettext('Export results')|generate_string|safe}}, className: "btn btn-primary",
action: function( e, dt, node, config ) {
- var columns = ["Data", "Jugador", "Estació", "Exercici",
- "RL", "Carrega", "n", "Perdua", "Rep", "Rang", "Vm", "VM", "Pm", "PM"];
+ var columns = [{{gettext('Date')|generate_string|safe}},
+
{{gettext('Player')|generate_string|safe}},
+
{{gettext('Station')|generate_string|safe}},
+
{{gettext('Exercice')|generate_string|safe}},
+ "RL",
+
{{gettext('Load')|generate_string|safe}},
+ "n",
+
{{gettext('Loss')|generate_string|safe}},
+ "Rep",
+ "Rang", "Vm", "VM", "Pm",
"PM"];
var csv = columns.join(";") + "\n";
var today = new Date();
@@ -262,7 +270,7 @@ $(document).ready(function() {
var hh = today.getHours();
var MM = today.getMinutes();
- var filename = "resultats_" + yyyy + formatDateNumber(mm) + formatDateNumber(dd) +
formatDateNumber(hh) + formatDateNumber(MM) + ".csv";
+ var filename = "results_" + yyyy + formatDateNumber(mm) + formatDateNumber(dd) +
formatDateNumber(hh) + formatDateNumber(MM) + ".csv";
var rows = $("#results").dataTable().$('tr', {"filter":"applied"});
rows.each(function( index ) {
//console.log( index + ": " + table.row( this ).data() );
@@ -314,16 +322,17 @@ $(document).ready(function() {
}
return csv;
}},
- { text: 'Eliminar registres',
+ { text: {{gettext('Delete results')|generate_string|safe}},
className: "btn btn-danger btnDeleteResults",
enabled: false,
action: function(e, dt, node, config) {
// Ask for confirmation
var total = $('.deleteCheckbox:checked').length;
if (total == 1) {
- var r = confirm("Estàs segur que vols esborrar aquest resultat?");
+
+ var r = confirm({{gettext('Are you sure to delete this
result?')|generate_string|safe}});
} else {
- var r = confirm("Estàs segur que vols esborrar aquests resultats?");
+ var r = confirm({{gettext('Are you sure to delete these
results?')|generate_string|safe}});
}
if (r == true) {
var results = [];
@@ -358,8 +367,8 @@ $(document).ready(function() {
"processing": true,
"severSide": true,
"language": {
- "lengthMenu": "Mostrant _MENU_ resultats per pàgina",
- "zeroRecords": "No hi han resultats per mostrar",
+ "lengthMenu": {{gettext('Showing _MENU_ results per page')|generate_string|safe}},
+ "zeroRecords": {{gettext('There are no records to show')|generate_string|safe}},
"info": "Mostrant els resultats _START_ a _END_ d'un total de _TOTAL_",
"infoEmpty": "La busqueda no ha retornat resultats",
"infoFiltered": "(filtrat de _MAX_ resultats)",
@@ -371,7 +380,7 @@ $(document).ready(function() {
"next": '<i class="fa fa-forward"></i>',
"previous": '<i class="fa fa-backward"></i>'
},
- "search": "Cerca:"
+ "search": {{gettext('Search:')|generate_string|safe}}
},
initComplete: function() {
/*
@@ -383,7 +392,7 @@ initComplete: function() {
var column = this;
var idx = column.index();
if (idx == COLUMN_PLAYER) {
- var select = $('<select class="form-control"><option value="">Tots els
jugadors</option></select>')
+ var select = $('<select class="form-control"><option value="">'+{{gettext('All the
players')|generate_string|safe}}+'</option></select>')
.appendTo($('#filterByPlayer'))
.on('change', function() {
// Player selected
@@ -404,7 +413,7 @@ initComplete: function() {
select.append('<option value="' + d + '">' + d + '</option>')
});
} else if (idx == COLUMN_STATION) {
- var select = $('<select class="form-control"><option value="">Totes les
estacions</option></select>')
+ var select = $('<select class="form-control"><option value="">'+{{gettext('All the
stations')|generate_string|safe}}+'</option></select>')
.appendTo($('#filterByStation'))
.on('change', function() {
var val = $.fn.dataTable.util.escapeRegex(
@@ -422,7 +431,7 @@ initComplete: function() {
select.append('<option value="' + d + '">' + d + '</option>')
});
} else if (idx == COLUMN_EXERCISE) {
- var select = $('<select class="form-control"><option value="">Tots els
exercicis</option></select>')
+ var select = $('<select class="form-control"><option value="">'+{{gettext('All the
exercices')|generate_string|safe}}+'</option></select>')
.appendTo($('#filterByExercice'))
.on('change', function() {
var val = $.fn.dataTable.util.escapeRegex(
diff --git a/chronojumpserver/translations/ca/LC_MESSAGES/messages.po
b/chronojumpserver/translations/ca/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..42c1328
--- /dev/null
+++ b/chronojumpserver/translations/ca/LC_MESSAGES/messages.po
@@ -0,0 +1,162 @@
+# Catalan translations for PROJECT.
+# Copyright (C) 2018 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2018-03-18 20:38+0000\n"
+"PO-Revision-Date: 2018-03-18 18:54+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language: ca\n"
+"Language-Team: ca <LL li org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.5.3\n"
+
+#: forms.py:19
+msgid "User"
+msgstr "Usuari"
+
+#: forms.py:19
+msgid "Username is required"
+msgstr "El Usuari és obligatori"
+
+#: forms.py:20
+msgid "Password"
+msgstr "Contrassenya"
+
+#: forms.py:20
+msgid "Password is required"
+msgstr "La contrassenya és obligatoria"
+
+#: templates/index.html:27
+msgid "Options"
+msgstr "Opcions"
+
+#: templates/index.html:33 templates/results.html:12
+msgid "Results"
+msgstr "Resultats"
+
+#: templates/index.html:34 templates/layout.html:34
+msgid "Sprints"
+msgstr ""
+
+#: templates/index.html:35 templates/layout.html:35
+msgid "Player list"
+msgstr ""
+
+#: templates/index.html:36 templates/layout.html:36
+msgid "Stations/Exercices"
+msgstr ""
+
+#: templates/index.html:38
+msgid "Close and leave session"
+msgstr ""
+
+#: templates/index.html:47
+msgid "Chronojump server is a product from Chronojump Boscosystem ®"
+msgstr ""
+
+#: templates/layout.html:33
+msgid "Resultats"
+msgstr ""
+
+#: templates/layout.html:38
+msgid "Leave session"
+msgstr ""
+
+#: templates/login.html:23
+msgid "Enter your user and password"
+msgstr "Introdueix el teu usuari i contrassenya :P"
+
+#: templates/login.html:26
+msgid "Login"
+msgstr ""
+
+#: templates/results.html:30
+msgid "All"
+msgstr ""
+
+#: templates/results.html:36
+msgid "By player"
+msgstr ""
+
+#: templates/results.html:40
+msgid "By station"
+msgstr ""
+
+#: templates/results.html:44
+msgid "By exercice"
+msgstr ""
+
+#: templates/results.html:141 templates/results.html:254
+msgid "Date"
+msgstr ""
+
+#: templates/results.html:175 templates/results.html:255
+msgid "Player"
+msgstr ""
+
+#: templates/results.html:180 templates/results.html:256
+msgid "Station"
+msgstr ""
+
+#: templates/results.html:185 templates/results.html:257
+msgid "Exercice"
+msgstr ""
+
+#: templates/results.html:194 templates/results.html:259
+msgid "Load"
+msgstr "Carrega"
+
+#: templates/results.html:206 templates/results.html:261
+msgid "Loss"
+msgstr "Pèrdua"
+
+#: templates/results.html:252
+msgid "Export results"
+msgstr ""
+
+#: templates/results.html:325
+msgid "Delete results"
+msgstr ""
+
+#: templates/results.html:333
+msgid "Are you sure to delete this result?"
+msgstr ""
+
+#: templates/results.html:335
+msgid "Are you sure to delete these results?"
+msgstr ""
+
+#: templates/results.html:370
+msgid "Showing _MENU_ results per page"
+msgstr ""
+
+#: templates/results.html:371
+msgid "There are no records to show"
+msgstr ""
+
+#: templates/results.html:383
+msgid "Search:"
+msgstr ""
+
+#: templates/results.html:395
+msgid "All the players"
+msgstr ""
+
+#: templates/results.html:416
+msgid "All the stations"
+msgstr ""
+
+#: templates/results.html:434
+msgid "All the exercices"
+msgstr ""
+
+#~ msgid "SOMETHING"
+#~ msgstr "Quelcom"
diff --git a/chronojumpserver/translations/es/LC_MESSAGES/messages.po
b/chronojumpserver/translations/es/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..c7e5a3d
--- /dev/null
+++ b/chronojumpserver/translations/es/LC_MESSAGES/messages.po
@@ -0,0 +1,163 @@
+# Spanish translations for PROJECT.
+# Copyright (C) 2018 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2018-03-18 20:38+0000\n"
+"PO-Revision-Date: 2018-03-18 19:08+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language: es\n"
+"Language-Team: es <LL li org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.5.3\n"
+
+#: forms.py:19
+msgid "User"
+msgstr "Usuario"
+
+#: forms.py:19
+msgid "Username is required"
+msgstr "El usuario es obligat"
+
+#: forms.py:20
+msgid "Password"
+msgstr "Contraseña"
+
+#: forms.py:20
+msgid "Password is required"
+msgstr "La contraseña es obligatoria"
+
+#: templates/index.html:27
+msgid "Options"
+msgstr ""
+
+#: templates/index.html:33 templates/results.html:12
+msgid "Results"
+msgstr ""
+
+#: templates/index.html:34 templates/layout.html:34
+msgid "Sprints"
+msgstr ""
+
+#: templates/index.html:35 templates/layout.html:35
+msgid "Player list"
+msgstr ""
+
+#: templates/index.html:36 templates/layout.html:36
+msgid "Stations/Exercices"
+msgstr ""
+
+#: templates/index.html:38
+msgid "Close and leave session"
+msgstr ""
+
+#: templates/index.html:47
+msgid "Chronojump server is a product from Chronojump Boscosystem ®"
+msgstr ""
+
+#: templates/layout.html:33
+msgid "Resultats"
+msgstr ""
+
+#: templates/layout.html:38
+msgid "Leave session"
+msgstr ""
+
+#: templates/login.html:23
+msgid "Enter your user and password"
+msgstr "Introduce tu usuario y contraseña"
+
+#: templates/login.html:26
+msgid "Login"
+msgstr ""
+
+#: templates/results.html:30
+msgid "All"
+msgstr ""
+
+#: templates/results.html:36
+msgid "By player"
+msgstr ""
+
+#: templates/results.html:40
+msgid "By station"
+msgstr ""
+
+#: templates/results.html:44
+msgid "By exercice"
+msgstr ""
+
+#: templates/results.html:141 templates/results.html:254
+msgid "Date"
+msgstr ""
+
+#: templates/results.html:175 templates/results.html:255
+msgid "Player"
+msgstr ""
+
+#: templates/results.html:180 templates/results.html:256
+msgid "Station"
+msgstr ""
+
+#: templates/results.html:185 templates/results.html:257
+msgid "Exercice"
+msgstr ""
+
+#: templates/results.html:194 templates/results.html:259
+msgid "Load"
+msgstr ""
+
+#: templates/results.html:206 templates/results.html:261
+msgid "Loss"
+msgstr ""
+
+#: templates/results.html:252
+msgid "Export results"
+msgstr ""
+
+#: templates/results.html:325
+msgid "Delete results"
+msgstr ""
+
+#: templates/results.html:333
+msgid "Are you sure to delete this result?"
+msgstr ""
+
+#: templates/results.html:335
+msgid "Are you sure to delete these results?"
+msgstr ""
+
+#: templates/results.html:370
+msgid "Showing _MENU_ results per page"
+msgstr ""
+
+#: templates/results.html:371
+msgid "There are no records to show"
+msgstr ""
+
+#: templates/results.html:383
+msgid "Search:"
+msgstr ""
+
+#: templates/results.html:395
+msgid "All the players"
+msgstr ""
+
+#: templates/results.html:416
+msgid "All the stations"
+msgstr ""
+
+#: templates/results.html:434
+msgid "All the exercices"
+msgstr ""
+
+#~ msgid "SOMETHING"
+#~ msgstr "ALGO"
+
diff --git a/chronojumpserver/views.py b/chronojumpserver/views.py
index 792b623..1440265 100755
--- a/chronojumpserver/views.py
+++ b/chronojumpserver/views.py
@@ -12,6 +12,9 @@ import os
from time import time
+
+
+
def is_safe_url(target):
"""
Snippet to check if the url is safe, specially when coming
diff --git a/requirements.txt b/requirements.txt
index 4ae1261..b3677dd 100755
--- a/requirements.txt
+++ b/requirements.txt
@@ -21,3 +21,4 @@ virtualenv==15.1.0
Werkzeug==0.9.6
Flask-WTF==0.14.2
flask-login
+Flask-Babel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]