From 89e5260027ae4c8b13e497af37c82f8215843db3 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 28 Jan 2021 01:04:10 +0100 Subject: [PATCH] Fin de la traduction --- fiches/forms.py | 10 +-- fiches/models.py | 6 +- fiches/templates/fiches/base.html | 2 +- fiches/templates/fiches/fiches_modif.html | 32 +++------ fiches/templates/fiches/home.html | 2 +- locale/en/LC_MESSAGES/django.mo | Bin 4447 -> 4648 bytes locale/en/LC_MESSAGES/django.po | 75 ++++++++++++++-------- 7 files changed, 66 insertions(+), 61 deletions(-) diff --git a/fiches/forms.py b/fiches/forms.py index ffd7b3b..b8f9782 100644 --- a/fiches/forms.py +++ b/fiches/forms.py @@ -1,6 +1,8 @@ from django import forms from django.forms.models import inlineformset_factory -from fiches.models import Profile, Department, Phone, Social, Mail, Address +from django.utils.translation import gettext_lazy as _ + +from fiches.models import Address, Department, Mail, Phone, Profile, Social class ProfileForm(forms.ModelForm): @@ -10,8 +12,8 @@ class ProfileForm(forms.ModelForm): class SearchForm(forms.Form): - name = forms.CharField(label="Nom/Surnom", max_length=1023, required=False) - year = forms.IntegerField(label="Promotion", required=False) + name = forms.CharField(label=_("Nom/Surnom"), max_length=1023, required=False) + year = forms.IntegerField(label=_("Promotion"), required=False) department = forms.ModelMultipleChoiceField( queryset=Department.objects.all(), required=False ) @@ -23,7 +25,7 @@ class SearchForm(forms.Form): and not cleaned_data["year"] and not cleaned_data["department"] ): - raise forms.ValidationError(("Tous les champs sont vides"), code="invalid") + raise forms.ValidationError(_("Tous les champs sont vides"), code="invalid") PhoneFormSet = inlineformset_factory(Profile, Phone, exclude=[]) diff --git a/fiches/models.py b/fiches/models.py index 8c7111a..90c8427 100644 --- a/fiches/models.py +++ b/fiches/models.py @@ -1,7 +1,7 @@ -from django.db import models -from django.core.validators import MinValueValidator -from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User +from django.core.validators import MinValueValidator +from django.db import models +from django.utils.translation import gettext_lazy as _ class Profile(models.Model): diff --git a/fiches/templates/fiches/base.html b/fiches/templates/fiches/base.html index 9ecc5f6..8d1eecb 100644 --- a/fiches/templates/fiches/base.html +++ b/fiches/templates/fiches/base.html @@ -27,7 +27,7 @@
{% csrf_token %} - +
diff --git a/fiches/templates/fiches/fiches_modif.html b/fiches/templates/fiches/fiches_modif.html index 71609cc..8d77c9c 100644 --- a/fiches/templates/fiches/fiches_modif.html +++ b/fiches/templates/fiches/fiches_modif.html @@ -63,39 +63,23 @@ {{ form.thurne }} -
- +
+ {% trans "Ajouter un numéro" as add_number %} {% include "fiches/multientry.html" with formset=phone_form new_entry_text=add_number %}
-
+
{% trans "Ajouter un réseau social" as add_social %} {% include "fiches/multientry.html" with formset=social_form new_entry_text=add_social %}
-
- +
+ {% trans "Ajouter un email" as add_mail %} {% include "fiches/multientry.html" with formset=mail_form new_entry_text=add_mail %}
-
- +
+ {% trans "Ajouter une adresse" as add_address %} {% include "fiches/multientry.html" with formset=address_form new_entry_text=add_address %}
@@ -120,5 +104,5 @@ {% endblock %} {% block extra_js %} - + {% endblock %} diff --git a/fiches/templates/fiches/home.html b/fiches/templates/fiches/home.html index f6648c5..bd2af5a 100644 --- a/fiches/templates/fiches/home.html +++ b/fiches/templates/fiches/home.html @@ -14,7 +14,7 @@ {{ form.year }} - + {{ form.department }} diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index 92899caebd9b3d5e76223cfff13c36b1f047491b..87744424bc6a5be1968c0fb044becf04d0f3fdbe 100644 GIT binary patch delta 1966 zcmYk7U2IfE6vxlDbla^Lx-DOAk$NfR%Tl#hEfg4IFu!*QyIs6xTa0-^f7=_xEFb?Y+SHddVn_vxm z6V8MgI2|5=bKqyN&Ma@|sVt=9I%I9T3!j4%P!p!$B3NE#wjKs>K1@4)0u}fuY=YNe zCA<&ixFq%@&>A>{_F|}YTVXB!Z3`7S+y$9q1CYmZ6x#V=I1iqHa&!(VIal59H=r_c z6DkwqP~#_{0`XXcs?|aEVo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HY^49cO01E2u>Q2j!-UJMmrIpk+*c_>5cU_RUm zmFh!K0kqrqXP^SP3ORh{UJm(Jq$wKY@B>sJU!hXe56fVX*~Y-NmMxZTa2o9$kgn!A zNtp5L^o7w@}MS;*!CFI#7m)4S_id)2Fpe$ zM_Zu!?Sh(bKUCnYQ1c#v3g8lCVM%k7f(AUbFJ4-vpd9r;9lCE&4zt;KVm4kV2LUJt zA*gvupd3Uk=Rsw-7HWK*<+?Q4{{{-2x%6tmU(;l((JV9@EkgsQfVA(jBD55(Li5lh zB&$G7oi+trg>;=KA_bl{{HG6&R{Fn9u$36piPqlfit3avM>@qiNYjx_pW4Z2u_~A{ zFks4#&Qdw5MGKHJB1;zYn2NM_`nu`x$#lPGq)Xg?OWlMiXa!n{7NI#v7C{S<_P7Rx zQ3jn&%-}y46v@4MPE5p^abMx*! zJDOVdIDS{5v)EPP9CWRB-nh0qYus_C)4jc`)YFpTid2\n" +"Language-Team: \n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Last-Translator: Tom Hubrecht \n" -"Language-Team: \n" "X-Generator: Poedit 2.4.1\n" +#: fiches/forms.py:15 +msgid "Nom/Surnom" +msgstr "Name/Nickname" + +#: fiches/forms.py:16 +msgid "Promotion" +msgstr "Entry year" + +#: fiches/forms.py:28 +msgid "Tous les champs sont vides" +msgstr "All fields are empty" + #: fiches/models.py:11 msgid "utilisateur" msgstr "user" @@ -100,6 +112,10 @@ msgstr "address" msgid "Annuaire des élèves de l'ENS" msgstr "ENS student directory" +#: fiches/templates/fiches/base.html:30 +msgid "Recherche Rapide" +msgstr "Quick Search" + #: fiches/templates/fiches/base.html:31 msgid "Rechercher" msgstr "Search" @@ -232,85 +248,85 @@ msgstr "Date of birth:" #: fiches/templates/fiches/fiches_modif.html:63 msgid "Thurne :" -msgstr "Room" +msgstr "Room :" -#: fiches/templates/fiches/fiches_modif.html:68 +#: fiches/templates/fiches/fiches_modif.html:66 msgid "Personnel" msgstr "Private" -#: fiches/templates/fiches/fiches_modif.html:69 +#: fiches/templates/fiches/fiches_modif.html:66 msgid "0612345678" msgstr "0612345678" -#: fiches/templates/fiches/fiches_modif.html:71 +#: fiches/templates/fiches/fiches_modif.html:67 msgid "Numéro(s) de téléphone :" msgstr "Phone number(s):" -#: fiches/templates/fiches/fiches_modif.html:72 +#: fiches/templates/fiches/fiches_modif.html:68 msgid "Ajouter un numéro" msgstr "Add a phone number" -#: fiches/templates/fiches/fiches_modif.html:77 +#: fiches/templates/fiches/fiches_modif.html:71 msgid "InstaTok" msgstr "InstaTok" -#: fiches/templates/fiches/fiches_modif.html:78 +#: fiches/templates/fiches/fiches_modif.html:71 msgid "mon_profil_instatok" msgstr "my_instatok_profile" -#: fiches/templates/fiches/fiches_modif.html:80 +#: fiches/templates/fiches/fiches_modif.html:72 msgid "Réseaux sociaux :" msgstr "Social networks:" -#: fiches/templates/fiches/fiches_modif.html:81 +#: fiches/templates/fiches/fiches_modif.html:73 msgid "Ajouter un réseau social" msgstr "Add a social network" -#: fiches/templates/fiches/fiches_modif.html:86 +#: fiches/templates/fiches/fiches_modif.html:76 msgid "Professionelle" msgstr "Professional" -#: fiches/templates/fiches/fiches_modif.html:87 +#: fiches/templates/fiches/fiches_modif.html:76 msgid "moi@ens.fr" msgstr "me@ens.fr" -#: fiches/templates/fiches/fiches_modif.html:89 -msgid "Mail(s):" +#: fiches/templates/fiches/fiches_modif.html:77 +msgid "Mail(s) :" msgstr "E-mail(s):" -#: fiches/templates/fiches/fiches_modif.html:90 +#: fiches/templates/fiches/fiches_modif.html:78 msgid "Ajouter un email" msgstr "Add an e-mail" -#: fiches/templates/fiches/fiches_modif.html:95 +#: fiches/templates/fiches/fiches_modif.html:81 msgid "Bureau" msgstr "Office" -#: fiches/templates/fiches/fiches_modif.html:96 +#: fiches/templates/fiches/fiches_modif.html:81 msgid "45 rue d'Ulm" msgstr "45 rue d'Ulm" -#: fiches/templates/fiches/fiches_modif.html:98 -msgid "Adresse(s):" +#: fiches/templates/fiches/fiches_modif.html:82 +msgid "Adresse(s) :" msgstr "Address(es):" -#: fiches/templates/fiches/fiches_modif.html:99 +#: fiches/templates/fiches/fiches_modif.html:83 msgid "Ajouter une adresse" msgstr "Add an address" -#: fiches/templates/fiches/fiches_modif.html:103 +#: fiches/templates/fiches/fiches_modif.html:87 msgid "Champ libre :" msgstr "Free space:" -#: fiches/templates/fiches/fiches_modif.html:109 +#: fiches/templates/fiches/fiches_modif.html:93 msgid "Apparaître sur l'annuaire papier ?" msgstr "Appear on the paper directory?" -#: fiches/templates/fiches/fiches_modif.html:113 +#: fiches/templates/fiches/fiches_modif.html:97 msgid "Conserver la fiche annuaire ?" msgstr "Keep the directory record?" -#: fiches/templates/fiches/fiches_modif.html:116 +#: fiches/templates/fiches/fiches_modif.html:100 msgid "Enregistrer" msgstr "Save" @@ -323,9 +339,12 @@ msgid "Nom/Surnom :" msgstr "Name/Nickname:" #: fiches/templates/fiches/home.html:17 -msgid "Department :" +msgid "Départment :" msgstr "Department:" #: fiches/templates/fiches/home.html:19 msgid "Recherche" msgstr "Search" + +#~ msgid "Department :" +#~ msgstr "Department:"