From d61fdd912dc4a2e24164738d48373f368764afdb Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 27 Jan 2021 21:58:24 +0100 Subject: [PATCH 1/7] =?UTF-8?q?On=20d=C3=A9place=20les=20urls=20vers=20l'a?= =?UTF-8?q?ppli=20fiches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annuaire/urls.py | 11 +++++------ fiches/urls.py | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/annuaire/urls.py b/annuaire/urls.py index a26909d..8d2de91 100644 --- a/annuaire/urls.py +++ b/annuaire/urls.py @@ -21,12 +21,11 @@ from fiches.views import BirthdayView, HomeView import django_cas_ng.views as cas_views urlpatterns = [ - path('admin/', admin.site.urls), - path('fiche/', include('fiches.urls')), - path('', HomeView.as_view(), name='home'), - path('birthday', BirthdayView.as_view(), name='birthday'), - path('accounts/login/', cas_views.LoginView.as_view(), name='cas_ng_login'), - path('logout', cas_views.LogoutView.as_view(), name='cas_ng_logout'), + path("", include("fiches.urls")), + path("admin/", admin.site.urls), + path("accounts/login/", cas_views.LoginView.as_view(), name="cas_ng_login"), + path("logout", cas_views.LogoutView.as_view(), name="cas_ng_logout"), + path("i18n/", include("django.conf.urls.i18n")), ] if settings.DEBUG: diff --git a/fiches/urls.py b/fiches/urls.py index df6d18c..b88b23b 100644 --- a/fiches/urls.py +++ b/fiches/urls.py @@ -2,6 +2,8 @@ from django.urls import path from . import views urlpatterns = [ - path("edit", views.EditView.as_view(), name="fiche_modif"), - path("", views.FicheView.as_view(), name="fiche"), + path("", views.HomeView.as_view(), name="home"), + path("fiche/edit", views.EditView.as_view(), name="fiche_modif"), + path("fiche/", views.FicheView.as_view(), name="fiche"), + path("birthday", views.BirthdayView.as_view(), name="birthday"), ] From 2821848f29cdfdf277dbcbd760bfb6e110dfa4d1 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 28 Jan 2021 00:29:20 +0100 Subject: [PATCH 2/7] =?UTF-8?q?D=C3=A9but=20pour=20la=20traduction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annuaire/settings.py | 1 + fiches/static/fiches/css/annuaire.css | 7 + fiches/static/fiches/scss/_common.scss | 2 +- fiches/static/fiches/scss/_header.scss | 7 +- fiches/static/fiches/scss/annuaire.scss | 2 +- fiches/templates/fiches/base.html | 9 +- fiches/templates/fiches/base.html.py | 83 ++++++++++++ fiches/templates/fiches/birthday.html.py | 23 ++++ fiches/templates/fiches/fiche.html.py | 107 +++++++++++++++ fiches/templates/fiches/fiches_modif.html.py | 124 ++++++++++++++++++ fiches/templates/fiches/home.html.py | 34 +++++ .../templates/fiches/mail/mail_modif.txt.py | 6 + fiches/templates/fiches/multientry.html.py | 25 ++++ fiches/views.py | 86 +++++++----- 14 files changed, 480 insertions(+), 36 deletions(-) create mode 100644 fiches/templates/fiches/base.html.py create mode 100644 fiches/templates/fiches/birthday.html.py create mode 100644 fiches/templates/fiches/fiche.html.py create mode 100644 fiches/templates/fiches/fiches_modif.html.py create mode 100644 fiches/templates/fiches/home.html.py create mode 100644 fiches/templates/fiches/mail/mail_modif.txt.py create mode 100644 fiches/templates/fiches/multientry.html.py diff --git a/annuaire/settings.py b/annuaire/settings.py index 4a86b9a..ee51242 100644 --- a/annuaire/settings.py +++ b/annuaire/settings.py @@ -63,6 +63,7 @@ INSTALLED_APPS = [ MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", diff --git a/fiches/static/fiches/css/annuaire.css b/fiches/static/fiches/css/annuaire.css index d6f4784..93b80ac 100644 --- a/fiches/static/fiches/css/annuaire.css +++ b/fiches/static/fiches/css/annuaire.css @@ -147,11 +147,16 @@ body { text-align: center; } #language_switch .language { + margin: 0; + padding: 0; display: inline-block; + background: none; + border: none; color: #DFDFDF; } #language_switch .language:hover { color: #FFDC00; + cursor: pointer; } #language_switch .language::after, #language_switch .current-language::after { @@ -523,3 +528,5 @@ body { display: block; text-align: center; } + +/*# sourceMappingURL=annuaire.css.map */ diff --git a/fiches/static/fiches/scss/_common.scss b/fiches/static/fiches/scss/_common.scss index 6f97d97..30bb280 100644 --- a/fiches/static/fiches/scss/_common.scss +++ b/fiches/static/fiches/scss/_common.scss @@ -46,7 +46,7 @@ body { #header { margin: 0; } - + #main { margin: 0; } diff --git a/fiches/static/fiches/scss/_header.scss b/fiches/static/fiches/scss/_header.scss index d9d90ad..d701a21 100644 --- a/fiches/static/fiches/scss/_header.scss +++ b/fiches/static/fiches/scss/_header.scss @@ -81,13 +81,18 @@ $account-area-height: 120px; text-align: center; .language { + margin: 0; + padding: 0; display: inline-block; + background: none; + border: none; // text-decoration: underline; color: colors.$page-text-secondary; } .language:hover { color: colors.$main-menu-link; + cursor: pointer; } .language::after, @@ -161,4 +166,4 @@ $account-area-height: 120px; .clipper { font-family: fonts.$monospace-fonts; } -} \ No newline at end of file +} diff --git a/fiches/static/fiches/scss/annuaire.scss b/fiches/static/fiches/scss/annuaire.scss index d9217eb..09cfe85 100644 --- a/fiches/static/fiches/scss/annuaire.scss +++ b/fiches/static/fiches/scss/annuaire.scss @@ -1,4 +1,4 @@ @use "common"; @use "header"; @use "content"; -@use "footer"; \ No newline at end of file +@use "footer"; diff --git a/fiches/templates/fiches/base.html b/fiches/templates/fiches/base.html index 3c8234c..9ecc5f6 100644 --- a/fiches/templates/fiches/base.html +++ b/fiches/templates/fiches/base.html @@ -17,8 +17,12 @@
{% block extra_js %}{% endblock %} + diff --git a/fiches/templates/fiches/base.html.py b/fiches/templates/fiches/base.html.py new file mode 100644 index 0000000..74bdc05 --- /dev/null +++ b/fiches/templates/fiches/base.html.py @@ -0,0 +1,83 @@ +BBBB BBBB +BBBB BBBBBBBBBBB +XXXXXXXXX XXXXX +XXXXXX + +XXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXXXX + XXXXXXX + BBBBB BBBBBBBBBBBB gettext(u"Annuaire des élèves de l'ENS") BBBBBBBB + XXXXXXXX + XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBBX XX + XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBX XX +XXXXXXX + +XXXXXX + XXXX XXXXXXXXXXX + XXXX XXXXXXXXXX + XXXX XXXXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXBBB BBBBBBBBBBBBBBX XXXXXXXXXXXXXX + BBBBBBBBBB + BBBBBBBBBBBBBBBBBBBB BB BBBB + XXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXX + XXXXXXX XXXXXXXXXXXXXXX BB BBBB BB BBBBBBBXXXXXXXXXXXXXXXXBBBBBX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX BB BBBB BB BBBBXXXXXXXXXXXXXXXXBBBBBX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXX + XXXXXX + + XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXBBB BBBBBBXX + BBBBBBBBBB + XXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXX + XXXXXXX XXXXXXXXXXXXXX gettext(u'Rechercher') XXXXXXXXX + XXXXXXX + + XXX XXXXXXXXXXX + BBBBB BBBBB XX XXXXXXBBB BBBBBBXX gettext(u"Annuaire des élèves de l'ENS") XXXXBBBBBBBB + XXXXX + + + XXXX XXXXXXXXXXXXXXX + XXXXX + XX XXXXXXBBB BBBBBBXX gettext(u'Accueil') XXXX + XX XXXXXXBBB BBBBBBBBBBBBBXX gettext(u"Modifier sa fiche d'annuaire") XXXX + BB BBBBBBBBBBBBBBBBBBBBB + XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBXX gettext(u"Consulter sa fiche d'annuaire") XXXX + BBBBB + XX XXXXXXBBB BBBBBBBBBBXX gettext(u'Anniversaires à venir') XXXX + XXXXXX + XXXXXX + + XXXX XXXXXXXXXXXXXXXXXX + BB BBBBBBBBBBBBBBBBBBBBB + gettext(u'Connecté en tant que %(user)s') SSSSSSSS SS SSSS SSS SSSSS SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSXXX XX + XX XXXXXXBBB BBBBBBBBBBBBBBBXX gettext(u'Se déconnecter') XXXX + BBBB + XX XXXXXXBBB BBBBBBBBBBBBBBXX gettext(u'Se connecter') XXXX + BBBBB + XXXXXX + XXXXXX + XXXXXX + + XXXX XXXXXXXXXX + XXXX XXXXXXXXXXXXXXXXXX + + BBBBB BBBBBBBBBBBBBBBBBBBBB + BBBBB BBBBBBBBBBBBBBB + + XXXXXX + XXXX XXXXXXXXXXXX + BBBBB BBBBBB + XXXXX XXXXXXXXXXXXXXX + gettext(u'Crée par KDENS · Propulsé par Django') + XXXXXXX + + XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Page des élèves') XXXXX + XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u"Contacter l'équipe annuaire") XXXXX + BBBBBBBB + XXXXXX + XXXXXX +XXXXXXX +BBBBB BBBBBBBBBBBBBBBB + +XXXXXXX diff --git a/fiches/templates/fiches/birthday.html.py b/fiches/templates/fiches/birthday.html.py new file mode 100644 index 0000000..7f0cf09 --- /dev/null +++ b/fiches/templates/fiches/birthday.html.py @@ -0,0 +1,23 @@ +BBBBBBB BBBBBBBBBBBBBBBBBB +BBBB BBBB + +BBBBB BBBBBBB + + +XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX + XXXX gettext(u'Anniversaires') XXXXX + + XXXXX + XXXX + BBB BBBBBBB BB BBBBBB + XXXX + XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX X FFFFFFF FF + XXXXX XXXXXXXXXXXXX gettext(u'ans') XXXXXXXX + XXXXX + BBBBBB + XXXXX + XXXXXX +XXXXXX + + +BBBBBBBB diff --git a/fiches/templates/fiches/fiche.html.py b/fiches/templates/fiches/fiche.html.py new file mode 100644 index 0000000..f5cef6f --- /dev/null +++ b/fiches/templates/fiches/fiche.html.py @@ -0,0 +1,107 @@ +BBBBBBB BBBBBBBBBBBBBBBBBB +BBBB BBBB + +BBBBB BBBBBBB + + +XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX + XXXX XXXXXXXXXXXXXXXXXXXXXXX + BB BBBBBBBBBBBBBBB + XX XXXXXXXX + XXXX XXXXXXXXXXXXX XXXXXXX + XXXX + BBBBB + XXX XXXXXXXXXXXXX + XX + BB BBBBBBBBBBBBBBBB + XXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXXX + BBBBB + XXXXX + XXXXXX + + XXXX XXXXXXXXXXXXXX + BB BBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Pronom(s) utilisé(s)') XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Département') FFFFFFFFFXXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXXBBB BBB BB BBBBBBBBBBBBBBBBBBBBBBBB BBB BBBBBBBBBBBBX BBBBBBBBBBBXXXXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Date de naissance') XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Thurne') XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXX XXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Téléphone') FFFFFFFFFXXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXX XXXXXXXXXXXXXX + BBB B BB BBBBBBBBBBBBBBBBBBBBB + XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX + BBBBBB + XXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXX XXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX _("Réseau social,Réseaux sociaux") XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXX XXXXXXXXXXXXXX + BBB B BB BBBBBBBBBBBBBBBBBBBBBB + XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX + BBBBBB + XXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXX XXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX _("Mail,Mails") XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXX XXXXXXXXXXXXXX + BBB B BB BBBBBBBBBBBBBBBBBBBB + XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX + BBBBBB + XXXXX + XXXXXX + BBBBB + BB BBBBBBBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXX XXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX _("Adresse,Adresses") XXXXXXX + XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX + XXX XXXXXXXXXXXXXX + BBB B BB BBBBBBBBBBBBBBBBBBBBBBB + XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX + BBBBBB + XXXXX + XXXXXX + BBBBB + XXXXXX + + BB BBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXXXXXX + XXXXX XXXXXXXXXXXXXX gettext(u'Champ libre') XXXXXXX + XX XXXXXXXXXXXXXXXXXX + XXXXXX + BBBBB + +XXXXXX + + +BBBBBBBB diff --git a/fiches/templates/fiches/fiches_modif.html.py b/fiches/templates/fiches/fiches_modif.html.py new file mode 100644 index 0000000..14e9393 --- /dev/null +++ b/fiches/templates/fiches/fiches_modif.html.py @@ -0,0 +1,124 @@ +BBBBBBB BBBBBBBBBBBBBBBBBB +BBBB BBBB +BBBB BBBBBBBBBBB + +BBBBB BBBBBBB + +XXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + XXXX gettext(u"Modifier ma page d'annuaire") XXXXX + + XXXXX XXXXXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + BBBBBBBBBB + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXX gettext(u'Nom :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXX gettext(u'Surnom :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Pronom(s) utilisé(s) :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Photo :') XXXXXXXX + XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX + XXXX XXXXXXXXXXXXXXXXXXXXXX + BB BBBBBBBBBBBBBBBBBBBBB + XX XXXXXXXX + XXXX XXXXXXX + XXXX + BBBB + XXXXX + BBBBB + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX + BB BBBBBBBBBBBBBBBBBBBBB + XXXX XXXXXXXXXXXXXX XXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Effacer (cochez la case) :') XXXXXXXX + XXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX + XXXXXX + BBBBB + XXXX XXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Nouvelle photo :') XXXXXXXX + XXXXXX XXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX + XXXXXX + XXXXXX + XXXXXX + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Département :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXX gettext(u'Promotion :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Date de naissance :') XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXX gettext(u'Thurne :') XXXXXXXX + + XXXXXX + XXXX + XXXXXXXXXXXXXXXXX XXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Personnel') X + XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'0612345678') X + X + XXXXXX XXXXXXXXXXXXXXX gettext(u'Numéro(s) de téléphone :') XXXXXXXX + gettext(u'Ajouter un numéro') + BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBB + XXXXXX + XXXX + XXXXXXXXXXXXXXXXX XXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXX gettext(u'InstaTok') X + XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'mon_profil_instatok') X + X + XXXXXX XXXXXXXXXXXXXXXX gettext(u'Réseaux sociaux :') XXXXXXXX + gettext(u'Ajouter un réseau social') + BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBB + XXXXXX + XXXX + XXXXXXXXXXXXXXXXX XXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Professionelle') X + XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'moi@ens.fr') X + X + XXXXXX XXXXXXXXXXXXXX gettext(u'Mail(s):') XXXXXXXX + gettext(u'Ajouter un email') + BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBB + XXXXXX + XXXX + XXXXXXXXXXXXXXXXX XXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Bureau') X + XXXXXXXXXXXXXXXXXXXXXXXX gettext(u"45 rue d'Ulm") X + X + XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Adresse(s):') XXXXXXXX + gettext(u'Ajouter une adresse') + BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBB + XXXXXX + XXXX XXXXXXXXXXXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Champ libre :') XXXXXXXX + XXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX + + XXXXXX + XXXXXX + XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXXX gettext(u"Apparaître sur l'annuaire papier ?") XXXXXXXX + + XXXXXX + XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXX + XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Conserver la fiche annuaire ?') XXXXXXXX + + XXXXXX + XXXXXX XXXXXXXXXXXXX XXXXXXX gettext(u'Enregistrer') XX + XXXXXXX +XXXXXX + +BBBBBBBB + +BBBBB BBBBBBBB + XXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBXXXXXXXXXXX +BBBBBBBB diff --git a/fiches/templates/fiches/home.html.py b/fiches/templates/fiches/home.html.py new file mode 100644 index 0000000..4afa361 --- /dev/null +++ b/fiches/templates/fiches/home.html.py @@ -0,0 +1,34 @@ +BBBBBBB BBBBBBBBBBBBBBBBBB +BBBB BBBB + +BBBBB BBBBBBB + + +XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX + XXXX gettext(u"Chercher quelqu'un·e dans l'annuaire") XXXXX + XXXXX XXXXXXXXXXXXX XXXXXXXXXX + BBBBBBBBBB + XXXXXX XXXXXXXXXXXXXX gettext(u'Nom/Surnom :') XXXXXXXX + + + XXXXXX XXXXXXXXXXXXXX gettext(u'Promotion :') XXXXXXXX + + + XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Department :') XXXXXXXX + + XXXXXX XXXXXXXXXXXXX XXXXXXX gettext(u'Recherche') XX + XXXXXXX + + XXXXX + XXXX + BBB BBBBBBB BB BBBBBB + XXXX + XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBXX XFFFFFFF F XXXXX + XXXXX + BBBBBB + XXXXX + XXXXXX +XXXXXX + + +BBBBBBBB diff --git a/fiches/templates/fiches/mail/mail_modif.txt.py b/fiches/templates/fiches/mail/mail_modif.txt.py new file mode 100644 index 0000000..3bc75d3 --- /dev/null +++ b/fiches/templates/fiches/mail/mail_modif.txt.py @@ -0,0 +1,6 @@ +XXXXXXX X + +XX XXXXX XXXXXXXX X XXX XXXXXXXX X + +XXXXXXXXXXXXX +XX XXXX XXX \ No newline at end of file diff --git a/fiches/templates/fiches/multientry.html.py b/fiches/templates/fiches/multientry.html.py new file mode 100644 index 0000000..c6ff1b6 --- /dev/null +++ b/fiches/templates/fiches/multientry.html.py @@ -0,0 +1,25 @@ + + +BBB BBBB BB BBBBBBB + + XXXX XXXXXXXXXXXXXXXXXXXXX BB BBBBBBBBBBBXXXXXXXXXBBBBBXX + BBB BBBBB BB BBBBBBBBBBBBBBBBBBB + + + BBBBBB + BBB BBBBB BB BBBBBBBBBBBBBBBBBB + + BBBBBB + XXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXX +BBBBBB +XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + BBB BBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + + BBBBBB + BBB BBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + + BBBBBB + XXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXX +XXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \ No newline at end of file diff --git a/fiches/views.py b/fiches/views.py index c7da8f5..db8ea5b 100644 --- a/fiches/views.py +++ b/fiches/views.py @@ -2,7 +2,14 @@ from django.shortcuts import render from django.shortcuts import get_object_or_404, redirect from django.contrib.auth.decorators import login_required from fiches.models import Profile, Phone, Social, Mail, Address -from fiches.forms import ProfileForm, SearchForm, PhoneFormSet, SocialFormSet, MailFormSet, AddressFormSet +from fiches.forms import ( + ProfileForm, + SearchForm, + PhoneFormSet, + SocialFormSet, + MailFormSet, + AddressFormSet, +) from django.forms import formset_factory from django.forms.models import model_to_dict from django.urls import reverse @@ -42,11 +49,14 @@ class EditView(UpdateView): mail_form = MailFormSet(instance=self.object) address_form = AddressFormSet(instance=self.object) return self.render_to_response( - self.get_context_data(form=form, - phone_form=phone_form, - social_form=social_form, - mail_form=mail_form, - address_form=address_form)) + self.get_context_data( + form=form, + phone_form=phone_form, + social_form=social_form, + mail_form=mail_form, + address_form=address_form, + ) + ) def post(self, request, *args, **kwargs): self.object = self.get_object() @@ -56,12 +66,21 @@ class EditView(UpdateView): social_form = SocialFormSet(self.request.POST, instance=self.object) mail_form = MailFormSet(self.request.POST, instance=self.object) address_form = AddressFormSet(self.request.POST, instance=self.object) - if (form.is_valid() and phone_form.is_valid() and social_form.is_valid() - and mail_form.is_valid() and address_form.is_valid()): - return self.form_valid(form, phone_form, social_form, mail_form, address_form) + if ( + form.is_valid() + and phone_form.is_valid() + and social_form.is_valid() + and mail_form.is_valid() + and address_form.is_valid() + ): + return self.form_valid( + form, phone_form, social_form, mail_form, address_form + ) else: - return self.form_invalid(form, phone_form, social_form, mail_form, address_form) - + return self.form_invalid( + form, phone_form, social_form, mail_form, address_form + ) + def form_valid(self, form, phone_form, social_form, mail_form, address_form): self.object = form.save() phone_form.save() @@ -69,21 +88,26 @@ class EditView(UpdateView): mail_form.save() address_form.save() send_mail( - "Fiche annuaire modifée", - render_to_string("fiches/mail/mail_modif.txt", {"profile": self.get_object()}), - "klub-dev@ens.psl.eu", - ["{}@clipper.ens.psl.eu".format(self.get_object().user.username)], - fail_silently=False, - ) + "Fiche annuaire modifée", + render_to_string( + "fiches/mail/mail_modif.txt", {"profile": self.get_object()} + ), + "klub-dev@ens.psl.eu", + ["{}@clipper.ens.psl.eu".format(self.get_object().user.username)], + fail_silently=False, + ) return HttpResponseRedirect(self.get_success_url()) def form_invalid(self, form, phone_form, social_form, mail_form, address_form): return self.render_to_response( - self.get_context_data(form=form, - phone_form=phone_form, - social_form=social_form, - mail_form=mail_form, - address_form=address_form)) + self.get_context_data( + form=form, + phone_form=phone_form, + social_form=social_form, + mail_form=mail_form, + address_form=address_form, + ) + ) def get_object(self): return self.request.user.profile @@ -100,9 +124,9 @@ class HomeView(FormView): def form_valid(self, form): result = Profile.objects.filter( - Q(full_name__icontains=form.cleaned_data["name"]) - | Q(nickname__icontains=form.cleaned_data["name"]) - ) + Q(full_name__icontains=form.cleaned_data["name"]) + | Q(nickname__icontains=form.cleaned_data["name"]) + ) return self.render_to_response(self.get_context_data(result=result)) @@ -111,19 +135,19 @@ class BirthdayView(ListView): model = Profile template_name = "fiches/birthday.html" - - def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) today = timezone.now() - context['result'] = list( - Profile.objects.filter(birth_date__day=today.day, birth_date__month=today.month) + context["result"] = list( + Profile.objects.filter( + birth_date__day=today.day, birth_date__month=today.month + ) ) for i in range(1, 7): today = today + timedelta(days=1) - context['result'] += list( + context["result"] += list( Profile.objects.filter( birth_date__day=today.day, birth_date__month=today.month ) ) - return context \ No newline at end of file + return context From 3fd0eb5929b088be88fb08c87cb766e6124d8d6d Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 28 Jan 2021 00:54:08 +0100 Subject: [PATCH 3/7] Traduction --- annuaire/settings.py | 7 + fiches/templates/fiches/base.html.py | 83 ----- fiches/templates/fiches/birthday.html.py | 23 -- fiches/templates/fiches/fiche.html.py | 107 ------ fiches/templates/fiches/fiches_modif.html.py | 124 ------- fiches/templates/fiches/home.html.py | 34 -- .../templates/fiches/mail/mail_modif.txt.py | 6 - fiches/templates/fiches/multientry.html.py | 25 -- locale/en/LC_MESSAGES/django.mo | Bin 0 -> 4447 bytes locale/en/LC_MESSAGES/django.po | 331 ++++++++++++++++++ 10 files changed, 338 insertions(+), 402 deletions(-) delete mode 100644 fiches/templates/fiches/base.html.py delete mode 100644 fiches/templates/fiches/birthday.html.py delete mode 100644 fiches/templates/fiches/fiche.html.py delete mode 100644 fiches/templates/fiches/fiches_modif.html.py delete mode 100644 fiches/templates/fiches/home.html.py delete mode 100644 fiches/templates/fiches/mail/mail_modif.txt.py delete mode 100644 fiches/templates/fiches/multientry.html.py create mode 100644 locale/en/LC_MESSAGES/django.mo create mode 100644 locale/en/LC_MESSAGES/django.po diff --git a/annuaire/settings.py b/annuaire/settings.py index ee51242..62cbb30 100644 --- a/annuaire/settings.py +++ b/annuaire/settings.py @@ -132,6 +132,13 @@ AUTH_PASSWORD_VALIDATORS = [ LANGUAGE_CODE = "fr-fr" +LANGUAGES = [ + ("fr", "Français"), + ("en", "English"), +] + +LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")] + TIME_ZONE = "UTC" USE_I18N = True diff --git a/fiches/templates/fiches/base.html.py b/fiches/templates/fiches/base.html.py deleted file mode 100644 index 74bdc05..0000000 --- a/fiches/templates/fiches/base.html.py +++ /dev/null @@ -1,83 +0,0 @@ -BBBB BBBB -BBBB BBBBBBBBBBB -XXXXXXXXX XXXXX -XXXXXX - -XXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXXXX - XXXXXXX - BBBBB BBBBBBBBBBBB gettext(u"Annuaire des élèves de l'ENS") BBBBBBBB - XXXXXXXX - XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBBX XX - XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBX XX -XXXXXXX - -XXXXXX - XXXX XXXXXXXXXXX - XXXX XXXXXXXXXX - XXXX XXXXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXBBB BBBBBBBBBBBBBBX XXXXXXXXXXXXXX - BBBBBBBBBB - BBBBBBBBBBBBBBBBBBBB BB BBBB - XXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXX - XXXXXXX XXXXXXXXXXXXXXX BB BBBB BB BBBBBBBXXXXXXXXXXXXXXXXBBBBBX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX BB BBBB BB BBBBXXXXXXXXXXXXXXXXBBBBBX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX - XXXXXXX - XXXXXX - - XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXBBB BBBBBBXX - BBBBBBBBBB - XXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXX - XXXXXXX XXXXXXXXXXXXXX gettext(u'Rechercher') XXXXXXXXX - XXXXXXX - - XXX XXXXXXXXXXX - BBBBB BBBBB XX XXXXXXBBB BBBBBBXX gettext(u"Annuaire des élèves de l'ENS") XXXXBBBBBBBB - XXXXX - - - XXXX XXXXXXXXXXXXXXX - XXXXX - XX XXXXXXBBB BBBBBBXX gettext(u'Accueil') XXXX - XX XXXXXXBBB BBBBBBBBBBBBBXX gettext(u"Modifier sa fiche d'annuaire") XXXX - BB BBBBBBBBBBBBBBBBBBBBB - XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBXX gettext(u"Consulter sa fiche d'annuaire") XXXX - BBBBB - XX XXXXXXBBB BBBBBBBBBBXX gettext(u'Anniversaires à venir') XXXX - XXXXXX - XXXXXX - - XXXX XXXXXXXXXXXXXXXXXX - BB BBBBBBBBBBBBBBBBBBBBB - gettext(u'Connecté en tant que %(user)s') SSSSSSSS SS SSSS SSS SSSSS SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSXXX XX - XX XXXXXXBBB BBBBBBBBBBBBBBBXX gettext(u'Se déconnecter') XXXX - BBBB - XX XXXXXXBBB BBBBBBBBBBBBBBXX gettext(u'Se connecter') XXXX - BBBBB - XXXXXX - XXXXXX - XXXXXX - - XXXX XXXXXXXXXX - XXXX XXXXXXXXXXXXXXXXXX - - BBBBB BBBBBBBBBBBBBBBBBBBBB - BBBBB BBBBBBBBBBBBBBB - - XXXXXX - XXXX XXXXXXXXXXXX - BBBBB BBBBBB - XXXXX XXXXXXXXXXXXXXX - gettext(u'Crée par KDENS · Propulsé par Django') - XXXXXXX - - XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Page des élèves') XXXXX - XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u"Contacter l'équipe annuaire") XXXXX - BBBBBBBB - XXXXXX - XXXXXX -XXXXXXX -BBBBB BBBBBBBBBBBBBBBB - -XXXXXXX diff --git a/fiches/templates/fiches/birthday.html.py b/fiches/templates/fiches/birthday.html.py deleted file mode 100644 index 7f0cf09..0000000 --- a/fiches/templates/fiches/birthday.html.py +++ /dev/null @@ -1,23 +0,0 @@ -BBBBBBB BBBBBBBBBBBBBBBBBB -BBBB BBBB - -BBBBB BBBBBBB - - -XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX - XXXX gettext(u'Anniversaires') XXXXX - - XXXXX - XXXX - BBB BBBBBBB BB BBBBBB - XXXX - XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX X FFFFFFF FF - XXXXX XXXXXXXXXXXXX gettext(u'ans') XXXXXXXX - XXXXX - BBBBBB - XXXXX - XXXXXX -XXXXXX - - -BBBBBBBB diff --git a/fiches/templates/fiches/fiche.html.py b/fiches/templates/fiches/fiche.html.py deleted file mode 100644 index f5cef6f..0000000 --- a/fiches/templates/fiches/fiche.html.py +++ /dev/null @@ -1,107 +0,0 @@ -BBBBBBB BBBBBBBBBBBBBBBBBB -BBBB BBBB - -BBBBB BBBBBBB - - -XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX - XXXX XXXXXXXXXXXXXXXXXXXXXXX - BB BBBBBBBBBBBBBBB - XX XXXXXXXX - XXXX XXXXXXXXXXXXX XXXXXXX - XXXX - BBBBB - XXX XXXXXXXXXXXXX - XX - BB BBBBBBBBBBBBBBBB - XXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXXX - BBBBB - XXXXX - XXXXXX - - XXXX XXXXXXXXXXXXXX - BB BBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Pronom(s) utilisé(s)') XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Département') FFFFFFFFFXXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXXBBB BBB BB BBBBBBBBBBBBBBBBBBBBBBBB BBB BBBBBBBBBBBBX BBBBBBBBBBBXXXXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Date de naissance') XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Thurne') XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXX XXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Téléphone') FFFFFFFFFXXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXX XXXXXXXXXXXXXX - BBB B BB BBBBBBBBBBBBBBBBBBBBB - XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX - BBBBBB - XXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXX XXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX _("Réseau social,Réseaux sociaux") XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXX XXXXXXXXXXXXXX - BBB B BB BBBBBBBBBBBBBBBBBBBBBB - XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX - BBBBBB - XXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXX XXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX _("Mail,Mails") XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXX XXXXXXXXXXXXXX - BBB B BB BBBBBBBBBBBBBBBBBBBB - XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX - BBBBBB - XXXXX - XXXXXX - BBBBB - BB BBBBBBBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXX XXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX _("Adresse,Adresses") XXXXXXX - XXXXX XXXXXXXXXXXXXXXXXXXXXXXXX - XXX XXXXXXXXXXXXXX - BBB B BB BBBBBBBBBBBBBBBBBBBBBBB - XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX - BBBBBB - XXXXX - XXXXXX - BBBBB - XXXXXX - - BB BBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXXXXXX - XXXXX XXXXXXXXXXXXXX gettext(u'Champ libre') XXXXXXX - XX XXXXXXXXXXXXXXXXXX - XXXXXX - BBBBB - -XXXXXX - - -BBBBBBBB diff --git a/fiches/templates/fiches/fiches_modif.html.py b/fiches/templates/fiches/fiches_modif.html.py deleted file mode 100644 index 14e9393..0000000 --- a/fiches/templates/fiches/fiches_modif.html.py +++ /dev/null @@ -1,124 +0,0 @@ -BBBBBBB BBBBBBBBBBBBBBBBBB -BBBB BBBB -BBBB BBBBBBBBBBB - -BBBBB BBBBBBB - -XXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX - XXXX gettext(u"Modifier ma page d'annuaire") XXXXX - - XXXXX XXXXXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - BBBBBBBBBB - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXX gettext(u'Nom :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXX gettext(u'Surnom :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Pronom(s) utilisé(s) :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Photo :') XXXXXXXX - XXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX - XXXX XXXXXXXXXXXXXXXXXXXXXX - BB BBBBBBBBBBBBBBBBBBBBB - XX XXXXXXXX - XXXX XXXXXXX - XXXX - BBBB - XXXXX - BBBBB - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX - BB BBBBBBBBBBBBBBBBBBBBB - XXXX XXXXXXXXXXXXXX XXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Effacer (cochez la case) :') XXXXXXXX - XXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX - XXXXXX - BBBBB - XXXX XXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Nouvelle photo :') XXXXXXXX - XXXXXX XXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX - XXXXXX - XXXXXX - XXXXXX - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Département :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXX gettext(u'Promotion :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Date de naissance :') XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXX gettext(u'Thurne :') XXXXXXXX - - XXXXXX - XXXX - XXXXXXXXXXXXXXXXX XXXXXXXXXXXX - XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Personnel') X - XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'0612345678') X - X - XXXXXX XXXXXXXXXXXXXXX gettext(u'Numéro(s) de téléphone :') XXXXXXXX - gettext(u'Ajouter un numéro') - BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBB - XXXXXX - XXXX - XXXXXXXXXXXXXXXXX XXXXXXXXXXXX - XXXXXXXXXXXXXXXXXXXXXXX gettext(u'InstaTok') X - XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'mon_profil_instatok') X - X - XXXXXX XXXXXXXXXXXXXXXX gettext(u'Réseaux sociaux :') XXXXXXXX - gettext(u'Ajouter un réseau social') - BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBB - XXXXXX - XXXX - XXXXXXXXXXXXXXXXX XXXXXXXXXXXX - XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Professionelle') X - XXXXXXXXXXXXXXXXXXXXXXXX gettext(u'moi@ens.fr') X - X - XXXXXX XXXXXXXXXXXXXX gettext(u'Mail(s):') XXXXXXXX - gettext(u'Ajouter un email') - BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBB - XXXXXX - XXXX - XXXXXXXXXXXXXXXXX XXXXXXXXXXXX - XXXXXXXXXXXXXXXXXXXXXXX gettext(u'Bureau') X - XXXXXXXXXXXXXXXXXXXXXXXX gettext(u"45 rue d'Ulm") X - X - XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Adresse(s):') XXXXXXXX - gettext(u'Ajouter une adresse') - BBBBBBB BBBBBBBBBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBB - XXXXXX - XXXX XXXXXXXXXXXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Champ libre :') XXXXXXXX - XXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX - - XXXXXX - XXXXXX - XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXXX gettext(u"Apparaître sur l'annuaire papier ?") XXXXXXXX - - XXXXXX - XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXX - XXXXXX XXXXXXXXXXXXXXXXX gettext(u'Conserver la fiche annuaire ?') XXXXXXXX - - XXXXXX - XXXXXX XXXXXXXXXXXXX XXXXXXX gettext(u'Enregistrer') XX - XXXXXXX -XXXXXX - -BBBBBBBB - -BBBBB BBBBBBBB - XXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXBBBBBB BBBBBBBBBBBBBBBBBBBBXXXXXXXXXXX -BBBBBBBB diff --git a/fiches/templates/fiches/home.html.py b/fiches/templates/fiches/home.html.py deleted file mode 100644 index 4afa361..0000000 --- a/fiches/templates/fiches/home.html.py +++ /dev/null @@ -1,34 +0,0 @@ -BBBBBBB BBBBBBBBBBBBBBBBBB -BBBB BBBB - -BBBBB BBBBBBB - - -XXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX - XXXX gettext(u"Chercher quelqu'un·e dans l'annuaire") XXXXX - XXXXX XXXXXXXXXXXXX XXXXXXXXXX - BBBBBBBBBB - XXXXXX XXXXXXXXXXXXXX gettext(u'Nom/Surnom :') XXXXXXXX - - - XXXXXX XXXXXXXXXXXXXX gettext(u'Promotion :') XXXXXXXX - - - XXXXXX XXXXXXXXXXXXXXXXXXXX gettext(u'Department :') XXXXXXXX - - XXXXXX XXXXXXXXXXXXX XXXXXXX gettext(u'Recherche') XX - XXXXXXX - - XXXXX - XXXX - BBB BBBBBBB BB BBBBBB - XXXX - XX XXXXXXBBB BBBBBBB BBBBBBBBBBBBBBBBBBBBBXX XFFFFFFF F XXXXX - XXXXX - BBBBBB - XXXXX - XXXXXX -XXXXXX - - -BBBBBBBB diff --git a/fiches/templates/fiches/mail/mail_modif.txt.py b/fiches/templates/fiches/mail/mail_modif.txt.py deleted file mode 100644 index 3bc75d3..0000000 --- a/fiches/templates/fiches/mail/mail_modif.txt.py +++ /dev/null @@ -1,6 +0,0 @@ -XXXXXXX X - -XX XXXXX XXXXXXXX X XXX XXXXXXXX X - -XXXXXXXXXXXXX -XX XXXX XXX \ No newline at end of file diff --git a/fiches/templates/fiches/multientry.html.py b/fiches/templates/fiches/multientry.html.py deleted file mode 100644 index c6ff1b6..0000000 --- a/fiches/templates/fiches/multientry.html.py +++ /dev/null @@ -1,25 +0,0 @@ - - -BBB BBBB BB BBBBBBB - - XXXX XXXXXXXXXXXXXXXXXXXXX BB BBBBBBBBBBBXXXXXXXXXBBBBBXX - BBB BBBBB BB BBBBBBBBBBBBBBBBBBB - - - BBBBBB - BBB BBBBB BB BBBBBBBBBBBBBBBBBB - - BBBBBB - XXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - XXXXXX -BBBBBB -XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - BBB BBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB - - BBBBBB - BBB BBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB - - BBBBBB - XXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -XXXXXX -XXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \ No newline at end of file diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..92899caebd9b3d5e76223cfff13c36b1f047491b GIT binary patch literal 4447 zcma);TWlRi8OH}2C^!Y$63Q*WG-+y^`Z&jKlA7Z$78f<8yXT z_Tt1JzFGxhZ0BQvi5`wByANc)u_gr#m z)zSI(H~0DGn{U23*Y4i&j3LbK^F9yN|0i%Cd;4i-?^jCx1%8+n&Xwh_K#hx`?D9C2K2JdH=NnM_e7dZEzT}HgE_N02Gr!<7 z{T}p!T5l(Zul4VN>bJKn4?yX65b`s}`N%$J;V!raW#_L#t^ZWn{%t5dwxIm(S5SIh zgIe!zPeF(|8phJL#^XO^}7f)-zJpaPe9H4b*S}! z0JX0lL-qfCS^sLuYf$UF2IX)6fm-i&4jq-v9Z>V{hMIpb)I5Vw^N*A~3}xTrP~#U$ zo-KI};%@m~K__XhdE@|c2sw$gll0M2Auuzlg|xeYzNB0X3~#c zlDL6nu-48Gm34`kybxuni)|KK*Ywo8TM=f>?X5WKt%|p|66a+$iRyvZ+u2#KSjJ3- zVX)!i#0yyV`jXv#)^4~kh*h1bgY{ivx3?PGFKm$Uoo)2b%rBbBR?CaM?H5yeBw0+Y z*B;RFS^@eVHOI0TP0ZAq*KFBFupGPIysc4kaUHQ2GuOD7^=IMBKW9NNOnT-sQ&AYY zdb+)3U1(D;Ox4{UPFh}Q>kThSCic`DL96BBJxBHpWQmIhlf(Pfd_-d@vsv5l>`K65 zwxj3KyftgcxJkR!@9aaZsaIEPqkntrVivTzgUu9nb`~4hQ`6YP-ro#-KT5~#LL9ZS zMuN6#oW9_NtC5-ZQW?^QUXUbSSa&zqV2)|WkhJO8A%*QNm7I##6=<7TS@G)VHBgV( z(c{`%-Amk{n!?zv1_{R!o0DOZdP~u|nZs>z=Tc@!pTx{Xez2l*YII6mfmNa{0r&kVsqxYD>76TFBexPyWDQ? zR4~t?v-QFau`30Cd#k71w!_jIIcEwmYN@+%)4qHqF*{coPdDDXxJmV%E5y3*;L^0F zF3gO7lgFWQ*P)tG@URP$;g#4lqwstSdk2m4fgC2qVX&~o`k8jx9oCLF`8k_nlu(?G za<@1e!h_~Z3*)4lEoX|OL&YrC(OuwrS5EqsM{xvBxn}#$xKI2o0YPIh)w=ToaYJ`lwxs!7<-Kj^0 zt9?_ska**~d zG_u%hRA!^Nnbd69%8SXw=(sJi69b{WcfyVgj-ye+dYY$!h2xrC!n`LkVq$$QwTIKF zIlNYu%7Z!5*+pf^c};fzSmn42U0jS`h@2m!c69i_@JQd=zAz`ErsGM;1OI?4-j}?< z`%=6HJOI8=P_(X+yJTL{Mdq?{+{^fTQB^!BHgxHwC|+-m@``E9u^>*@d~Y)`XIu5C ziH+=Xr%C}bNi$!O&F4+2V}VUQA&wBqtxgHcycz_fPU}(g$O`e=nc3L!!nBBYJy~5y zk85pLB4Rgtl(s=JQD=(w!{OLo@-E+tQ_i(=bvmEd4cC1PX7Y2+pMxShR3I@ka;WC!&HKw6ZoTz+ujz>QeD}`>_4TkQVyQet5UzV1 zDPME3@Pnj3e|5P1!3G8@B7Yv;%fQcnmzgk)H|-`TU55QE?8N#!+jfJ}8_Z(`J3+b(+Rn)4J-zvpLAkuT`6-lv+8OR&Y0x567xoOxb2G7a My&i, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 23:35+0000\n" +"PO-Revision-Date: 2021-01-28 00:50+0100\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/models.py:11 +msgid "utilisateur" +msgstr "user" + +#: fiches/models.py:14 +msgid "nom" +msgstr "name" + +#: fiches/models.py:15 +msgid "surnom" +msgstr "nickname" + +#: fiches/models.py:17 +msgid "pronom(s) utilisé(s)" +msgstr "pronoun(s)" + +#: fiches/models.py:20 +msgid "photo" +msgstr "photo" + +#: fiches/models.py:22 +msgid "département" +msgstr "department" + +#: fiches/models.py:24 +msgid "promotion" +msgstr "entry year" + +#: fiches/models.py:27 +msgid "date de naissance" +msgstr "birth date" + +#: fiches/models.py:29 +msgid "thurne" +msgstr "room" + +#: fiches/models.py:30 +msgid "champ libre" +msgstr "free space" + +#: fiches/models.py:32 +msgid "apparaître sur l'annuaire papier ?" +msgstr "appear on the paper directory?" + +#: fiches/models.py:35 +msgid "conserver la fiche annuaire ?" +msgstr "keep the directory record?" + +#: fiches/models.py:47 +msgid "nom du département" +msgstr "department name" + +#: fiches/models.py:56 fiches/models.py:67 fiches/models.py:78 +#: fiches/models.py:89 +msgid "profil" +msgstr "profile" + +#: fiches/models.py:58 fiches/models.py:69 fiches/models.py:80 +#: fiches/models.py:91 +msgid "type" +msgstr "kind" + +#: fiches/models.py:59 +msgid "numéro" +msgstr "number" + +#: fiches/models.py:70 +msgid "contenu" +msgstr "content" + +#: fiches/models.py:81 +msgid "adresse mail" +msgstr "e-mail" + +#: fiches/models.py:92 +msgid "adresse" +msgstr "address" + +#: fiches/templates/fiches/base.html:10 fiches/templates/fiches/base.html:35 +msgid "Annuaire des élèves de l'ENS" +msgstr "ENS student directory" + +#: fiches/templates/fiches/base.html:31 +msgid "Rechercher" +msgstr "Search" + +#: fiches/templates/fiches/base.html:41 +msgid "Accueil" +msgstr "Home" + +#: fiches/templates/fiches/base.html:42 +msgid "Modifier sa fiche d'annuaire" +msgstr "Edit your directory record" + +#: fiches/templates/fiches/base.html:44 +msgid "Consulter sa fiche d'annuaire" +msgstr "View your directory record" + +#: fiches/templates/fiches/base.html:46 +msgid "Anniversaires à venir" +msgstr "Upcoming birthdays" + +#: fiches/templates/fiches/base.html:52 +#, python-format +msgid "Connecté en tant que %(user)s" +msgstr "Connected as %(user)s" + +#: fiches/templates/fiches/base.html:53 +msgid "Se déconnecter" +msgstr "Log out" + +#: fiches/templates/fiches/base.html:55 +msgid "Se connecter" +msgstr "Log in" + +#: fiches/templates/fiches/base.html:71 +msgid "Crée par KDENS · Propulsé par Django" +msgstr "Created by KDENS · Powered by Django" + +#: fiches/templates/fiches/base.html:75 +msgid "Page des élèves" +msgstr "Students' page" + +#: fiches/templates/fiches/base.html:76 +msgid "Contacter l'équipe annuaire" +msgstr "Contact the directory team" + +#: fiches/templates/fiches/birthday.html:8 +msgid "Anniversaires" +msgstr "Birthdays" + +#: fiches/templates/fiches/birthday.html:15 +msgid "ans" +msgstr "years" + +#: fiches/templates/fiches/fiche.html:25 +msgid "Pronom(s) utilisé(s)" +msgstr "Pronoun(s)" + +#: fiches/templates/fiches/fiche.html:32 +msgid "Département" +msgstr "Department" + +#: fiches/templates/fiches/fiche.html:39 +msgid "Date de naissance" +msgstr "Date of birth" + +#: fiches/templates/fiches/fiche.html:46 +msgid "Thurne" +msgstr "Room" + +#: fiches/templates/fiches/fiche.html:53 +msgid "Téléphone" +msgstr "Phone number" + +#: fiches/templates/fiches/fiche.html:64 +msgid "Réseau social,Réseaux sociaux" +msgstr "Social network,Social networks" + +#: fiches/templates/fiches/fiche.html:75 +msgid "Mail,Mails" +msgstr "E-mail,E-mails" + +#: fiches/templates/fiches/fiche.html:86 +msgid "Adresse,Adresses" +msgstr "Address,Addresses" + +#: fiches/templates/fiches/fiche.html:99 +msgid "Champ libre" +msgstr "Free space" + +#: fiches/templates/fiches/fiches_modif.html:8 +msgid "Modifier ma page d'annuaire" +msgstr "Edit my directory record" + +#: fiches/templates/fiches/fiches_modif.html:13 +msgid "Nom :" +msgstr "Name:" + +#: fiches/templates/fiches/fiches_modif.html:17 +msgid "Surnom :" +msgstr "Nickname:" + +#: fiches/templates/fiches/fiches_modif.html:21 +msgid "Pronom(s) utilisé(s) :" +msgstr "Pronoun(s):" + +#: fiches/templates/fiches/fiches_modif.html:25 +msgid "Photo :" +msgstr "Photo:" + +#: fiches/templates/fiches/fiches_modif.html:39 +msgid "Effacer (cochez la case) :" +msgstr "Delete (check the box):" + +#: fiches/templates/fiches/fiches_modif.html:44 +msgid "Nouvelle photo :" +msgstr "New photo:" + +#: fiches/templates/fiches/fiches_modif.html:51 +msgid "Département :" +msgstr "Department:" + +#: fiches/templates/fiches/fiches_modif.html:55 +#: fiches/templates/fiches/home.html:14 +msgid "Promotion :" +msgstr "Entry year:" + +#: fiches/templates/fiches/fiches_modif.html:59 +msgid "Date de naissance :" +msgstr "Date of birth:" + +#: fiches/templates/fiches/fiches_modif.html:63 +msgid "Thurne :" +msgstr "Room" + +#: fiches/templates/fiches/fiches_modif.html:68 +msgid "Personnel" +msgstr "Private" + +#: fiches/templates/fiches/fiches_modif.html:69 +msgid "0612345678" +msgstr "0612345678" + +#: fiches/templates/fiches/fiches_modif.html:71 +msgid "Numéro(s) de téléphone :" +msgstr "Phone number(s):" + +#: fiches/templates/fiches/fiches_modif.html:72 +msgid "Ajouter un numéro" +msgstr "Add a phone number" + +#: fiches/templates/fiches/fiches_modif.html:77 +msgid "InstaTok" +msgstr "InstaTok" + +#: fiches/templates/fiches/fiches_modif.html:78 +msgid "mon_profil_instatok" +msgstr "my_instatok_profile" + +#: fiches/templates/fiches/fiches_modif.html:80 +msgid "Réseaux sociaux :" +msgstr "Social networks:" + +#: fiches/templates/fiches/fiches_modif.html:81 +msgid "Ajouter un réseau social" +msgstr "Add a social network" + +#: fiches/templates/fiches/fiches_modif.html:86 +msgid "Professionelle" +msgstr "Professional" + +#: fiches/templates/fiches/fiches_modif.html:87 +msgid "moi@ens.fr" +msgstr "me@ens.fr" + +#: fiches/templates/fiches/fiches_modif.html:89 +msgid "Mail(s):" +msgstr "E-mail(s):" + +#: fiches/templates/fiches/fiches_modif.html:90 +msgid "Ajouter un email" +msgstr "Add an e-mail" + +#: fiches/templates/fiches/fiches_modif.html:95 +msgid "Bureau" +msgstr "Office" + +#: fiches/templates/fiches/fiches_modif.html:96 +msgid "45 rue d'Ulm" +msgstr "45 rue d'Ulm" + +#: fiches/templates/fiches/fiches_modif.html:98 +msgid "Adresse(s):" +msgstr "Address(es):" + +#: fiches/templates/fiches/fiches_modif.html:99 +msgid "Ajouter une adresse" +msgstr "Add an address" + +#: fiches/templates/fiches/fiches_modif.html:103 +msgid "Champ libre :" +msgstr "Free space:" + +#: fiches/templates/fiches/fiches_modif.html:109 +msgid "Apparaître sur l'annuaire papier ?" +msgstr "Appear on the paper directory?" + +#: fiches/templates/fiches/fiches_modif.html:113 +msgid "Conserver la fiche annuaire ?" +msgstr "Keep the directory record?" + +#: fiches/templates/fiches/fiches_modif.html:116 +msgid "Enregistrer" +msgstr "Save" + +#: fiches/templates/fiches/home.html:8 +msgid "Chercher quelqu'un·e dans l'annuaire" +msgstr "Search for someone in the directory" + +#: fiches/templates/fiches/home.html:11 +msgid "Nom/Surnom :" +msgstr "Name/Nickname:" + +#: fiches/templates/fiches/home.html:17 +msgid "Department :" +msgstr "Department:" + +#: fiches/templates/fiches/home.html:19 +msgid "Recherche" +msgstr "Search" From 89e5260027ae4c8b13e497af37c82f8215843db3 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 28 Jan 2021 01:04:10 +0100 Subject: [PATCH 4/7] 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?|aEVoRX{3Dl2&+ek$LbiEjSnM)d2Vr)WV-a9y?9(0=xi~ z>YtzjxD6}dU8s#bfXZkQi>n=jwXh1xUlT=M5v`-51=?XT?1DOy9>`+{DU|Y~P~*=) z?Q9fk-VYF8b^|KqH=)+~)3yJGn)eVYb5SNKFwZ0Z+Tlz(wDbAyhZe^KoJM~;WUg(4 z9T5V9a(Ie^q-tlO#$9sl%TNJcg*Ms zkq$sPd=Dy+51}%20^Jt_$fC}Ut$WJx^wcc=^iWWTP_&LjROs0Dt8)$lfy@( z`%r-$ckM4+djx9yDAf2%u6+e6W7i;${qFkjLphp+%5)LuqK$cwb@En8MQ2hCwO|v} zgv65pwi#+?olp+Cp#mI)+W9cl_>-=G#PMq=hu=Y6$}3Qge}N>+euYuJ|9?=CgMXkF zx(DT8(y@e#p(BVxEl}fF=eQ7ZCv7G2Q48upFCo3AvM!`INOwV5mDQtJ__vqQawI41 zNa-t>B9|>iI&YaiF3QAWq%(dEb)%g~#uxmtwNmatYmhFrHdU~7RP;5?uP*dB>Q=w< zOy3IXi%=6HA@&ARS~sC(s9?GiTTlXRM4OS0=T)>86>K||t*8z0jmX;uDoVdhe+)9+ zgKbF1AzOtyQ8RiG1!xIsKxE%uM+=btaAX}wZ-Gp2lRn!zI+@P?sRiLT(Pa^T>{j$) zB)n5Lue9UZg=}*FP6UFW4r!ccDcibJNJ&+jNx)^{w4NPdFO7={y1!!5ml#{jdg( zHzsK|QV7wIfQ&I0peF8w8qftN!TWG7`~=6r(9l1OK?U9j!!QB!;58`6ccB7*Zuu4t zquvY0;NSF7ki&eJF%(VEvIJ`7WpFI4hH_L72gAKk6DOcD&<54-JX8R;AwTn&2Qix$ zP>x?i`RjoN_&47vjD#M%Q8Xba$6+3Yuo5bz8=xFE!(6xzD&S*KnLBCgXQ3QigmQcx zYFsxQ1Rp?U{1Hs5V=o1z^as>{d>XZa0Mx)z$SX4!Dy2106E)cSCa7_{p)zv-Dxg-V z1s#P2@T6_;w7lUV|2k*gH1IQbc*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:" From bfe219fc2ef2a7862d19f02b42b01dadf11d988b Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 4 Feb 2021 20:58:39 +0100 Subject: [PATCH 5/7] =?UTF-8?q?On=20fait=20plaisir=20=C3=A0=20Martin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en/LC_MESSAGES/django.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 4c5b3dd..0cf17e4 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -1,7 +1,7 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Annuaire translations +# Copyright (C) 2021 Klub Dev ENS +# This file is distributed under the same license as the annuaire package. +# Klub Dev ENS , 2021. # msgid "" msgstr "" From 5994689fc7fefad08c13f4569d4ca0b51e1d36be Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 4 Feb 2021 21:14:56 +0100 Subject: [PATCH 6/7] Small fixes --- locale/en/LC_MESSAGES/django.mo | Bin 4648 -> 4645 bytes locale/en/LC_MESSAGES/django.po | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index 87744424bc6a5be1968c0fb044becf04d0f3fdbe..1b7ed3a87236275d5f110b339592d9d2dfda4933 100644 GIT binary patch delta 528 zcmXZZy-Pw-7{~Dk%gmc^Wp5OOfm0Bu2vH3|Lz90%Pz{k%))Hn)lhj_&c(;axhM+-)n4_wqT;>v6LfZlmHF4&br#6vv2t z?8Q6m#|KpY6RQ3N$MGE}@E3y^P4Hq8l{by5%OtE}jBU{^6fi`*hJCn&5!^);)KLdJ zaq*dpeN=uEm4EHxHck;gBaeN!`5#oDPNHEJX7I;^ZWbQwZWO~|;t|w_GpK?&x4wkB z*$S#b0d>GV)Xi(C{Bt+&J1l~ ze$+YXOtt2N8zC<@o5`ng*@bMrbrE?Cc+2HVbthHatd?5k_x6-pis#o1G7OFm)Z*&|3gdUR%8u< zQ_Vq3TT{^1RJ1tt{o%nMKKJh4yLWg0>vSi5R~l+Z&1^GfHi7#X#wL#Asq-9XiG3W# z2OPyGRQ@xn{uLAWf%Eu>LG(N`^_fBCrBQWx&)UY=R@_1nL&V!Sf)$M5A*!H-I@pW)Z7|T2z9Fw=@2CTOp&ERnHu^y|=sSaxgJ0mG>gSwE z=R$WmxD^WLGK)*8Y_5>acdsJ7Ky+=VQBECIQoGf9W3O9@JqE%D)mq6;j>~oX2d+3b AYXATM diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 0cf17e4..0184b62 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-28 00:03+0000\n" -"PO-Revision-Date: 2021-01-28 01:03+0100\n" +"PO-Revision-Date: 2021-02-04 21:14+0100\n" "Last-Translator: Tom Hubrecht \n" "Language-Team: \n" "Language: en\n" @@ -90,7 +90,7 @@ msgstr "profile" #: fiches/models.py:58 fiches/models.py:69 fiches/models.py:80 #: fiches/models.py:91 msgid "type" -msgstr "kind" +msgstr "type" #: fiches/models.py:59 msgid "numéro" @@ -179,7 +179,7 @@ msgstr "Department" #: fiches/templates/fiches/fiche.html:39 msgid "Date de naissance" -msgstr "Date of birth" +msgstr "Birth date" #: fiches/templates/fiches/fiche.html:46 msgid "Thurne" From cc520191c20691fef1e0e08386e61d8b5490bd84 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 4 Feb 2021 21:15:52 +0100 Subject: [PATCH 7/7] Small fixes --- locale/en/LC_MESSAGES/django.mo | Bin 4645 -> 4642 bytes locale/en/LC_MESSAGES/django.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index 1b7ed3a87236275d5f110b339592d9d2dfda4933..b26d98b36a919938aed17cd0b754425e304f1494 100644 GIT binary patch delta 500 zcmXZZF-QYJ5QX6}nnW+roQYr%3>E<^I|B+mc4udH_pY1$=Kb+_Tr#sx#Vo)cDn513aGp593B1EeOi}rd zIDWhsCj0 XdRZRkg3Y6osJpbk7agQg4s zx(R}do0H(?q_}j{@6S9)_~hNackk|URc@B=4!Wa)b8frnTtC)v08h;ZjuFS$gDvdC zdsO}ds{R?r@eL>N2Q%mgyjVizO{3~&k;g3tF8ZIS5M>!y!(QCPJno?iPEZ>=v-sTN z7?s~d<=!5sbuQF^l6V7gENhnW~bEjWWJn78>Q)X7#*4JxP& z?xRj#N9AAGcx+yy8s1_F+o&6TS>=PHRzb$Q2Gme)B>aCq!}g) fnQFFcF1gGM1fW diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 0184b62..08ceca6 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-28 00:03+0000\n" -"PO-Revision-Date: 2021-02-04 21:14+0100\n" +"PO-Revision-Date: 2021-02-04 21:15+0100\n" "Last-Translator: Tom Hubrecht \n" "Language-Team: \n" "Language: en\n" @@ -244,7 +244,7 @@ msgstr "Entry year:" #: fiches/templates/fiches/fiches_modif.html:59 msgid "Date de naissance :" -msgstr "Date of birth:" +msgstr "Birth date:" #: fiches/templates/fiches/fiches_modif.html:63 msgid "Thurne :"