POC Campus Condorcet : i18n, traductions, partie 3

This commit is contained in:
Paul Marillonnet 2017-05-14 18:10:35 +02:00
parent 1d551f687c
commit 24d1b219da
3 changed files with 42 additions and 8 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-14 15:54+0000\n"
"POT-Creation-Date: 2017-05-14 16:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -90,6 +90,26 @@ msgstr "Erreur HTTP"
msgid "during WCS form submission"
msgstr "lors de l'envoi du formulaire WCS"
#: saml/views.py:28
msgid ""
"Your account has already been registered to the Campus Condorcet account "
"base."
msgstr "Votre compte est deja cree dans la base du Campus Condorcet."
#: saml/views.py:34
msgid "Your account creation request has been sent."
msgstr "Votre demande de creation de compte a bien ete prise en compte."
#: saml/views.py:49
msgid ""
"Please check the entries below, fill in the empty fields and submit your "
"account request"
msgstr "Veuillez confirmer les elements ci-dessous, completer les champs vides et valider votre demande d'inscription."
#: saml/views.py:51
msgid "Please fill in the empty fields and submit your account request"
msgstr "Veuillez completer les champs vides et valider votre demande d'inscription."
#: sp_sso/settings.py:136
msgid "French"
msgstr "Francais"
@ -122,6 +142,18 @@ msgstr "Portail"
msgid "Portal Management"
msgstr "Gestion du portail"
#: templates/registration_form.html:6
msgid "Bonjour"
msgstr "Hi"
#: templates/registration_form.html:11
msgid "Invite :"
msgstr "Guest:"
#: templates/registration_form.html:24
msgid "Hote :"
msgstr "Host"
#: templates/root.html:28
msgid ""
"\n"

View File

@ -1,5 +1,6 @@
from django.views.generic import FormView
from django.shortcuts import render
from django.utils.translation import ugettext as _
from .forms import RegistrationForm
from .utils import ldap_contains_user, wcs_submit, \
@ -24,13 +25,13 @@ wcs_multiple_fields = ['s_entite_affectation',
'ep_affiliation']
def usernone(request):
message = "Votre compte est deja cree dans la base du Campus Condorcet."
message = _("Your account has already been registered to the Campus Condorcet account base.")
template = 'simple_message.html'
return render(request, template, {'message' : message})
def wcs_post(request):
return render(request, 'simple_message.html',
{'message':'La procedure de creation de votre compte a bien ete prise en compte.'})
{'message':_("Your account creation request has been sent.")})
class RegistrationFormView(FormView):
form_class = RegistrationForm
@ -45,9 +46,9 @@ class RegistrationFormView(FormView):
attribute_element = self.request.session['mellon_session'].get(attribute, [''])[0]
initial[attribute] = str(attribute_element)
initial['user_nickname'] = craft_user_nickname(self.request.session['mellon_session'])
initial['user_help_msg'] = "Confirmez les elements ci-dessous, completez votre demande et validez votre demande d'inscription"
initial['user_help_msg'] = _("Please check the entries below, fill in the empty fields and submit your account request")
else:
initial['user_help_msg'] = "Completez votre demande et validez votre demande d'inscription"
initial['user_help_msg'] = _("Please fill in the empty fields and submit your account request")
return initial

View File

@ -1,13 +1,14 @@
{% extends "sp_base.html" %}
{% load i18n %}
{% block content %}
Bonjour {{ form.user_nickname }}<br>
{% trans "Bonjour" %} {{ form.user_nickname }}<br>
{{ form.user_help_msg }} <br><br>
<form action="{% url "register" %}" method="post">
{% csrf_token %}
<h2>Invite :</h2><br>
<h2>{% trans "Invite :" %}</h2><br>
{% include "registration_field.html" with field=form.prenom %}
{% include "registration_field.html" with field=form.nom %}
{% include "registration_field.html" with field=form.email %}
@ -20,7 +21,7 @@ Bonjour {{ form.user_nickname }}<br>
{% include "registration_field.html" with field=form.s_emp_corps %}
{% include "registration_field.html" with field=form.s_liste_rouge %}
</p>
<h2>Hote :</h2><br>
<h2>{% trans "Hote :" %}</h2><br>
{% include "registration_field.html" with field=form.hote_prenom %}
{% include "registration_field.html" with field=form.hote_nom %}
{% include "registration_field.html" with field=form.hote_etablissement %}