Fin de la traduction

This commit is contained in:
Tom Hubrecht 2021-01-28 01:04:10 +01:00
parent 3fd0eb5929
commit 89e5260027
7 changed files with 66 additions and 61 deletions

View file

@ -1,6 +1,8 @@
from django import forms from django import forms
from django.forms.models import inlineformset_factory 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): class ProfileForm(forms.ModelForm):
@ -10,8 +12,8 @@ class ProfileForm(forms.ModelForm):
class SearchForm(forms.Form): class SearchForm(forms.Form):
name = forms.CharField(label="Nom/Surnom", max_length=1023, required=False) name = forms.CharField(label=_("Nom/Surnom"), max_length=1023, required=False)
year = forms.IntegerField(label="Promotion", required=False) year = forms.IntegerField(label=_("Promotion"), required=False)
department = forms.ModelMultipleChoiceField( department = forms.ModelMultipleChoiceField(
queryset=Department.objects.all(), required=False queryset=Department.objects.all(), required=False
) )
@ -23,7 +25,7 @@ class SearchForm(forms.Form):
and not cleaned_data["year"] and not cleaned_data["year"]
and not cleaned_data["department"] 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=[]) PhoneFormSet = inlineformset_factory(Profile, Phone, exclude=[])

View file

@ -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.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): class Profile(models.Model):

View file

@ -27,7 +27,7 @@
<form id="search-area" method="post" action='{% url "home" %}'> <form id="search-area" method="post" action='{% url "home" %}'>
{% csrf_token %} {% csrf_token %}
<input id="id_name" name="name" type="search" placeholder="Recherche Rapide"> <input id="id_name" name="name" type="search" placeholder="{% trans "Recherche Rapide" %}">
<button type="submit">{% trans "Rechercher" %}</button> <button type="submit">{% trans "Rechercher" %}</button>
</form> </form>

View file

@ -63,39 +63,23 @@
<label for="id_thurne">{% trans "Thurne :" %}</label> <label for="id_thurne">{% trans "Thurne :" %}</label>
{{ form.thurne }} {{ form.thurne }}
</div> </div>
<div <div class="form-entry multi-entry" data-type-placeholder="{% trans "Personnel" %}" data-value-placeholder="{% trans "0612345678" %}">
class="form-entry multi-entry" <label for="id_phone">{% trans "Numéro(s) de téléphone :" %}</label>
data-type-placeholder="{% trans "Personnel" %}"
data-value-placeholder="{% trans "0612345678" %}"
>
<label for="id_phone">{% trans "Numéro(s) de téléphone :" %}</label>
{% trans "Ajouter un numéro" as add_number %} {% trans "Ajouter un numéro" as add_number %}
{% include "fiches/multientry.html" with formset=phone_form new_entry_text=add_number %} {% include "fiches/multientry.html" with formset=phone_form new_entry_text=add_number %}
</div> </div>
<div <div class="form-entry multi-entry" data-type-placeholder="{% trans "InstaTok" %}" data-value-placeholder="{% trans "mon_profil_instatok" %}">
class="form-entry multi-entry"
data-type-placeholder="{% trans "InstaTok" %}"
data-value-placeholder="{% trans "mon_profil_instatok" %}"
>
<label for="id_social">{% trans "Réseaux sociaux :" %}</label> <label for="id_social">{% trans "Réseaux sociaux :" %}</label>
{% trans "Ajouter un réseau social" as add_social %} {% trans "Ajouter un réseau social" as add_social %}
{% include "fiches/multientry.html" with formset=social_form new_entry_text=add_social %} {% include "fiches/multientry.html" with formset=social_form new_entry_text=add_social %}
</div> </div>
<div <div class="form-entry multi-entry" data-type-placeholder="{% trans "Professionelle" %}" data-value-placeholder="{% trans "moi@ens.fr" %}">
class="form-entry multi-entry" <label for="id_mail">{% trans "Mail(s) :" %}</label>
data-type-placeholder="{% trans "Professionelle" %}"
data-value-placeholder="{% trans "moi@ens.fr" %}"
>
<label for="id_mail">{% trans "Mail(s):" %}</label>
{% trans "Ajouter un email" as add_mail %} {% trans "Ajouter un email" as add_mail %}
{% include "fiches/multientry.html" with formset=mail_form new_entry_text=add_mail %} {% include "fiches/multientry.html" with formset=mail_form new_entry_text=add_mail %}
</div> </div>
<div <div class="form-entry multi-entry" data-type-placeholder="{% trans "Bureau" %}" data-value-placeholder="{% trans "45 rue d'Ulm" %}">
class="form-entry multi-entry" <label for="id_address">{% trans "Adresse(s) :" %}</label>
data-type-placeholder="{% trans "Bureau" %}"
data-value-placeholder="{% trans "45 rue d'Ulm" %}"
>
<label for="id_address">{% trans "Adresse(s):" %}</label>
{% trans "Ajouter une adresse" as add_address %} {% trans "Ajouter une adresse" as add_address %}
{% include "fiches/multientry.html" with formset=address_form new_entry_text=add_address %} {% include "fiches/multientry.html" with formset=address_form new_entry_text=add_address %}
</div> </div>
@ -120,5 +104,5 @@
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
<script type="text/javascript" src="{% static "fiches/js/forms.js" %}"></script> <script type="text/javascript" src="{% static "fiches/js/forms.js" %}"></script>
{% endblock %} {% endblock %}

View file

@ -14,7 +14,7 @@
<label for="id_year">{% trans "Promotion :" %}</label> <label for="id_year">{% trans "Promotion :" %}</label>
{{ form.year }} {{ form.year }}
<label for="id_department">{% trans "Department :" %}</label> <label for="id_department">{% trans "Départment :" %}</label>
{{ form.department }} {{ form.department }}
<input type="submit" value="{% trans "Recherche" %}"> <input type="submit" value="{% trans "Recherche" %}">
</form> </form>

Binary file not shown.

View file

@ -7,17 +7,29 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-27 23:35+0000\n" "POT-Creation-Date: 2021-01-28 00:03+0000\n"
"PO-Revision-Date: 2021-01-28 00:50+0100\n" "PO-Revision-Date: 2021-01-28 01:03+0100\n"
"Last-Translator: Tom Hubrecht <tom.hubrecht@ens.fr>\n"
"Language-Team: \n"
"Language: en\n" "Language: en\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Last-Translator: Tom Hubrecht <tom.hubrecht@ens.fr>\n"
"Language-Team: \n"
"X-Generator: Poedit 2.4.1\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 #: fiches/models.py:11
msgid "utilisateur" msgid "utilisateur"
msgstr "user" msgstr "user"
@ -100,6 +112,10 @@ msgstr "address"
msgid "Annuaire des élèves de l'ENS" msgid "Annuaire des élèves de l'ENS"
msgstr "ENS student directory" msgstr "ENS student directory"
#: fiches/templates/fiches/base.html:30
msgid "Recherche Rapide"
msgstr "Quick Search"
#: fiches/templates/fiches/base.html:31 #: fiches/templates/fiches/base.html:31
msgid "Rechercher" msgid "Rechercher"
msgstr "Search" msgstr "Search"
@ -232,85 +248,85 @@ msgstr "Date of birth:"
#: fiches/templates/fiches/fiches_modif.html:63 #: fiches/templates/fiches/fiches_modif.html:63
msgid "Thurne :" msgid "Thurne :"
msgstr "Room" msgstr "Room :"
#: fiches/templates/fiches/fiches_modif.html:68 #: fiches/templates/fiches/fiches_modif.html:66
msgid "Personnel" msgid "Personnel"
msgstr "Private" msgstr "Private"
#: fiches/templates/fiches/fiches_modif.html:69 #: fiches/templates/fiches/fiches_modif.html:66
msgid "0612345678" msgid "0612345678"
msgstr "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 :" msgid "Numéro(s) de téléphone :"
msgstr "Phone number(s):" msgstr "Phone number(s):"
#: fiches/templates/fiches/fiches_modif.html:72 #: fiches/templates/fiches/fiches_modif.html:68
msgid "Ajouter un numéro" msgid "Ajouter un numéro"
msgstr "Add a phone number" msgstr "Add a phone number"
#: fiches/templates/fiches/fiches_modif.html:77 #: fiches/templates/fiches/fiches_modif.html:71
msgid "InstaTok" msgid "InstaTok"
msgstr "InstaTok" msgstr "InstaTok"
#: fiches/templates/fiches/fiches_modif.html:78 #: fiches/templates/fiches/fiches_modif.html:71
msgid "mon_profil_instatok" msgid "mon_profil_instatok"
msgstr "my_instatok_profile" msgstr "my_instatok_profile"
#: fiches/templates/fiches/fiches_modif.html:80 #: fiches/templates/fiches/fiches_modif.html:72
msgid "Réseaux sociaux :" msgid "Réseaux sociaux :"
msgstr "Social networks:" msgstr "Social networks:"
#: fiches/templates/fiches/fiches_modif.html:81 #: fiches/templates/fiches/fiches_modif.html:73
msgid "Ajouter un réseau social" msgid "Ajouter un réseau social"
msgstr "Add a social network" msgstr "Add a social network"
#: fiches/templates/fiches/fiches_modif.html:86 #: fiches/templates/fiches/fiches_modif.html:76
msgid "Professionelle" msgid "Professionelle"
msgstr "Professional" msgstr "Professional"
#: fiches/templates/fiches/fiches_modif.html:87 #: fiches/templates/fiches/fiches_modif.html:76
msgid "moi@ens.fr" msgid "moi@ens.fr"
msgstr "me@ens.fr" msgstr "me@ens.fr"
#: fiches/templates/fiches/fiches_modif.html:89 #: fiches/templates/fiches/fiches_modif.html:77
msgid "Mail(s):" msgid "Mail(s) :"
msgstr "E-mail(s):" msgstr "E-mail(s):"
#: fiches/templates/fiches/fiches_modif.html:90 #: fiches/templates/fiches/fiches_modif.html:78
msgid "Ajouter un email" msgid "Ajouter un email"
msgstr "Add an e-mail" msgstr "Add an e-mail"
#: fiches/templates/fiches/fiches_modif.html:95 #: fiches/templates/fiches/fiches_modif.html:81
msgid "Bureau" msgid "Bureau"
msgstr "Office" msgstr "Office"
#: fiches/templates/fiches/fiches_modif.html:96 #: fiches/templates/fiches/fiches_modif.html:81
msgid "45 rue d'Ulm" msgid "45 rue d'Ulm"
msgstr "45 rue d'Ulm" msgstr "45 rue d'Ulm"
#: fiches/templates/fiches/fiches_modif.html:98 #: fiches/templates/fiches/fiches_modif.html:82
msgid "Adresse(s):" msgid "Adresse(s) :"
msgstr "Address(es):" msgstr "Address(es):"
#: fiches/templates/fiches/fiches_modif.html:99 #: fiches/templates/fiches/fiches_modif.html:83
msgid "Ajouter une adresse" msgid "Ajouter une adresse"
msgstr "Add an address" msgstr "Add an address"
#: fiches/templates/fiches/fiches_modif.html:103 #: fiches/templates/fiches/fiches_modif.html:87
msgid "Champ libre :" msgid "Champ libre :"
msgstr "Free space:" msgstr "Free space:"
#: fiches/templates/fiches/fiches_modif.html:109 #: fiches/templates/fiches/fiches_modif.html:93
msgid "Apparaître sur l'annuaire papier ?" msgid "Apparaître sur l'annuaire papier ?"
msgstr "Appear on the paper directory?" 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 ?" msgid "Conserver la fiche annuaire ?"
msgstr "Keep the directory record?" msgstr "Keep the directory record?"
#: fiches/templates/fiches/fiches_modif.html:116 #: fiches/templates/fiches/fiches_modif.html:100
msgid "Enregistrer" msgid "Enregistrer"
msgstr "Save" msgstr "Save"
@ -323,9 +339,12 @@ msgid "Nom/Surnom :"
msgstr "Name/Nickname:" msgstr "Name/Nickname:"
#: fiches/templates/fiches/home.html:17 #: fiches/templates/fiches/home.html:17
msgid "Department :" msgid "Départment :"
msgstr "Department:" msgstr "Department:"
#: fiches/templates/fiches/home.html:19 #: fiches/templates/fiches/home.html:19
msgid "Recherche" msgid "Recherche"
msgstr "Search" msgstr "Search"
#~ msgid "Department :"
#~ msgstr "Department:"