POC Campus Condorcet : i18n, traductions, partie 2
This commit is contained in:
parent
4895a45868
commit
1d551f687c
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-05-14 15:35+0000\n"
|
||||
"POT-Creation-Date: 2017-05-14 15:54+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"
|
||||
|
@ -74,6 +74,22 @@ msgstr "Etablissement invitant"
|
|||
msgid "Host entity or unit"
|
||||
msgstr "Unite invitante"
|
||||
|
||||
#: saml/utils.py:50
|
||||
msgid "Error while binding to the OpenLDAP server."
|
||||
msgstr "Erreur de connexion au serveur OpenLDAP"
|
||||
|
||||
#: saml/utils.py:65 saml/utils.py:82
|
||||
msgid "No description"
|
||||
msgstr "Pas de description"
|
||||
|
||||
#: saml/utils.py:136
|
||||
msgid "HTTP error "
|
||||
msgstr "Erreur HTTP"
|
||||
|
||||
#: saml/utils.py:136
|
||||
msgid "during WCS form submission"
|
||||
msgstr "lors de l'envoi du formulaire WCS"
|
||||
|
||||
#: sp_sso/settings.py:136
|
||||
msgid "French"
|
||||
msgstr "Francais"
|
||||
|
@ -82,6 +98,18 @@ msgstr "Francais"
|
|||
msgid "English"
|
||||
msgstr "Anglais"
|
||||
|
||||
#: templates/index.html:18
|
||||
msgid "Welcome to the Campus Condorcet subscription website!"
|
||||
msgstr "Bienvenue sur le site d'inscription au Campus Condorcet !"
|
||||
|
||||
#: templates/index.html:20
|
||||
msgid "Register using your source institution account"
|
||||
msgstr "Inscription via votre établissement d'appartenance"
|
||||
|
||||
#: templates/index.html:21
|
||||
msgid "Register using an empty form"
|
||||
msgstr "Formulaire libre"
|
||||
|
||||
#: templates/login.html:8 templates/registration/login.html:8
|
||||
msgid "Log in"
|
||||
msgstr "S'identifier"
|
||||
|
|
|
@ -4,6 +4,7 @@ import logging
|
|||
|
||||
from urllib2 import build_opener, HTTPHandler, Request, HTTPError
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
rootdn = 'dc=condorcet,dc=dev,dc=entrouvert,dc=org'
|
||||
people_base = 'ou=supannPeople,'+rootdn
|
||||
|
@ -46,7 +47,7 @@ def ldap_init():
|
|||
l = ldap.open(server)
|
||||
l.simple_bind(who, cred)
|
||||
except ldap.LDAPError:
|
||||
logger.error('Error while binding to the OpenLDAP server.')
|
||||
logger.error(_('Error while binding to the OpenLDAP server.'))
|
||||
l = None
|
||||
return l
|
||||
# Used to fill the choices in hote_etablissemnt form ChoiceField:
|
||||
|
@ -61,7 +62,7 @@ def ldap_get_etablissements():
|
|||
for etablissement in rdata:
|
||||
etablissement_data = etablissement[1]
|
||||
ou = etablissement_data['ou'][0]
|
||||
description = etablissement_data.get('description', ['Pas de description'])[0]
|
||||
description = etablissement_data.get('description', [_('No description')])[0]
|
||||
choices.append((ou, ou+" - "+description))
|
||||
|
||||
return choices
|
||||
|
@ -78,7 +79,7 @@ def ldap_get_unites():
|
|||
for unite in rdata:
|
||||
unite_data = unite[1]
|
||||
ou = unite_data['ou'][0]
|
||||
description = unite_data.get('description', ['Pas de description'])[0]
|
||||
description = unite_data.get('description', [_('No description')])[0]
|
||||
choices.append((ou, ou+" - "+description))
|
||||
|
||||
return choices
|
||||
|
@ -132,7 +133,7 @@ def wcs_submit(id):
|
|||
try:
|
||||
opener.open(req)
|
||||
except HTTPError, e:
|
||||
logger.error('HTTP error '+ str(e.code) +'during WCS form submission')
|
||||
logger.error(_('HTTP error ')+ str(e.code) +_('during WCS form submission'))
|
||||
ret = -1
|
||||
|
||||
return ret
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "sp_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
<div id='main'>
|
||||
<div id='header'>
|
||||
|
@ -14,10 +15,10 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 style='text-align:center'>Bienvenue sur le site d'inscription au Campus Condorcet.</h1><br><br>
|
||||
<h1 style='text-align:center'>{% trans "Welcome to the Campus Condorcet subscription website!" %}</h1><br><br>
|
||||
<p style='text-align:center'>
|
||||
<a class='button' href="{% url "auth_login" %}">Inscription via votre établissement d'appartenance</a>
|
||||
<a class='button' href="{% url "register" %}">Formulaire libre</a>
|
||||
<a class='button' href="{% url "auth_login" %}">{% trans "Register using your source institution account" %}</a>
|
||||
<a class='button' href="{% url "register" %}">{% trans "Register using an empty form" %}</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
Reference in New Issue