Localize table headers

This commit is contained in:
Yohann D'ANELLO 2020-05-06 00:15:46 +02:00
parent 235d7162e5
commit 03063599a5
2 changed files with 20 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import django_tables2 as tables import django_tables2 as tables
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy as _
from django_tables2 import A from django_tables2 import A
from member.models import Solution, Synthesis from member.models import Solution, Synthesis
@ -54,6 +54,7 @@ class SolutionTable(tables.Table):
"tournament:detail", "tournament:detail",
args=[A("tournament.pk")], args=[A("tournament.pk")],
accessor=A("tournament"), accessor=A("tournament"),
verbose_name=_("tournament"),
) )
file = tables.LinkColumn( file = tables.LinkColumn(
@ -87,6 +88,7 @@ class SynthesisTable(tables.Table):
"tournament:detail", "tournament:detail",
args=[A("tournament.pk")], args=[A("tournament.pk")],
accessor=A("tournament"), accessor=A("tournament"),
verbose_name=_("tournament"),
) )
file = tables.LinkColumn( file = tables.LinkColumn(
@ -111,6 +113,10 @@ class SynthesisTable(tables.Table):
class PoolTable(tables.Table): class PoolTable(tables.Table):
problems = tables.Column(verbose_name=_("Problems"))
tournament = tables.Column(verbose_name=_("Tournament"))
def render_teams(self, value): def render_teams(self, value):
return ", ".join(team.trigram for team in value.all()) return ", ".join(team.trigram for team in value.all())

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TFJM2\n" "Project-Id-Version: TFJM2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-05 23:20+0200\n" "POT-Creation-Date: 2020-05-06 00:01+0200\n"
"PO-Revision-Date: 2020-04-29 02:30+0000\n" "PO-Revision-Date: 2020-04-29 02:30+0000\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n" "Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: fr <LL@li.org>\n" "Language-Team: fr <LL@li.org>\n"
@ -569,6 +569,14 @@ msgstr "Du {start: %d %b %Y} au {end:%d %b %Y}"
msgid "Download" msgid "Download"
msgstr "Télécharger" msgstr "Télécharger"
#: apps/tournament/tables.py:114
msgid "Problems"
msgstr "Problèmes"
#: apps/tournament/tables.py:116
msgid "Tournament"
msgstr "Tournoi"
#: apps/tournament/views.py:50 #: apps/tournament/views.py:50
msgid "Tournaments list" msgid "Tournaments list"
msgstr "Liste des tournois" msgstr "Liste des tournois"
@ -999,14 +1007,13 @@ msgid ""
"The deadline to send your solutions is reached. However, you have an extra " "The deadline to send your solutions is reached. However, you have an extra "
"time of 30 minutes to send your papers, no panic :)" "time of 30 minutes to send your papers, no panic :)"
msgstr "" msgstr ""
"La date limite pour envoyer vos solutions est dépassée. Toutefois, vous " "La date limite pour envoyer vos solutions est dépassée. Toutefois, vous avez "
"avez droit à un délai supplémentaire de 30 minutes pour envoyer vos " "droit à un délai supplémentaire de 30 minutes pour envoyer vos papiers, pas "
"papiers, pas de panique :)" "de panique :)"
#: templates/tournament/solutions_list.html:16 #: templates/tournament/solutions_list.html:16
msgid "You can't upload your solutions anymore." msgid "You can't upload your solutions anymore."
msgstr "" msgstr "Vous ne pouvez plus publier vos solutions."
"Vous ne pouvez plus publier vos solutions."
#: templates/tournament/solutions_orga_list.html:14 #: templates/tournament/solutions_orga_list.html:14
#: templates/tournament/syntheses_orga_list.html:14 #: templates/tournament/syntheses_orga_list.html:14