From b62506ed1a3d768019997d3b8acd3899f83544c1 Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Fri, 9 Oct 2015 09:49:55 +0200 Subject: [PATCH] #7879: fixing status message encoding and adding translation --- .../idp/saml/locale/fr/LC_MESSAGES/django.po | 54 +++++++++++++--------- src/authentic2/idp/saml/saml2_endpoints.py | 5 +- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/authentic2/idp/saml/locale/fr/LC_MESSAGES/django.po b/src/authentic2/idp/saml/locale/fr/LC_MESSAGES/django.po index 300e473..234b5fd 100644 --- a/src/authentic2/idp/saml/locale/fr/LC_MESSAGES/django.po +++ b/src/authentic2/idp/saml/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Authentic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-22 09:46+0200\n" +"POT-Creation-Date: 2015-10-08 18:22+0200\n" "PO-Revision-Date: 2014-11-21 11:43+0100\n" "Last-Translator: Mikaël Ates \n" "Language-Team: None\n" @@ -17,19 +17,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" -#: authentic2/idp/saml/__init__.py:28 +#: src/authentic2/idp/saml/__init__.py:28 msgid "SAML2" msgstr "" -#: authentic2/idp/saml/backend.py:133 +#: src/authentic2/idp/saml/backend.py:133 msgid "Delete" msgstr "Supprimer" -#: authentic2/idp/saml/backend.py:148 +#: src/authentic2/idp/saml/backend.py:148 msgid "Create" msgstr "Créer" -#: authentic2/idp/saml/saml2_endpoints.py:437 +#: src/authentic2/idp/saml/saml2_endpoints.py:437 #, python-format msgid "" "SAMLv2 Single Sign On: invalid message for WebSSO profile with HTTP-Redirect " @@ -38,7 +38,7 @@ msgstr "" "SAMLv2 Single Sign On: message invalide pour le profil utilisant le binding " "HTTP-Redirect: %r" -#: authentic2/idp/saml/saml2_endpoints.py:442 +#: src/authentic2/idp/saml/saml2_endpoints.py:442 msgid "" "SAMLv2 Single Sign On: the request cannot be answered because no valid " "protocol binding could be found" @@ -46,49 +46,57 @@ msgstr "" "SAMLv2 Single Sign On: la requête ne peut être traitée car elle est " "invalide: un binding de protocole n'a pu être trouvé" -#: authentic2/idp/saml/saml2_endpoints.py:477 +#: src/authentic2/idp/saml/saml2_endpoints.py:477 msgid "sso: No SP policy defined" msgstr "sso: Pas de politique pour les fournisseurs de service définie" -#: authentic2/idp/saml/saml2_endpoints.py:588 +#: src/authentic2/idp/saml/saml2_endpoints.py:588 msgid "continue_sso: error loading login" msgstr "continnue_sso: erreur au rechargement de l'objet login" -#: authentic2/idp/saml/saml2_endpoints.py:592 +#: src/authentic2/idp/saml/saml2_endpoints.py:592 #, python-format msgid "continue_sso: unknown provider %s" msgstr "continue_sso: fournisseur %s inconnu" -#: authentic2/idp/saml/saml2_endpoints.py:711 +#: src/authentic2/idp/saml/saml2_endpoints.py:598 +msgid "User canceled login process" +msgstr "L'utilisateur a annulé le processus d'authentification" + +#: src/authentic2/idp/saml/saml2_endpoints.py:604 +msgid "User refused to consent" +msgstr "L'utilisateur a refusé la féderation de son compte" + +#: src/authentic2/idp/saml/saml2_endpoints.py:712 #, python-format msgid "Provider %s is unknown" msgstr "Le fournisseur %s est inconnu" -#: authentic2/idp/saml/saml2_endpoints.py:715 +#: src/authentic2/idp/saml/saml2_endpoints.py:716 msgid "No service provider policy defined" msgstr "Pas de politique de fournisseur de service définie" -#: authentic2/idp/saml/saml2_endpoints.py:861 -#: authentic2/idp/saml/saml2_endpoints.py:1033 -#: authentic2/idp/saml/saml2_endpoints.py:1045 -#: authentic2/idp/saml/saml2_endpoints.py:1269 -#: authentic2/idp/saml/saml2_endpoints.py:1303 -#: authentic2/idp/saml/saml2_endpoints.py:1351 -#: authentic2/idp/saml/saml2_endpoints.py:1362 +#: src/authentic2/idp/saml/saml2_endpoints.py:862 +#: src/authentic2/idp/saml/saml2_endpoints.py:1034 +#: src/authentic2/idp/saml/saml2_endpoints.py:1046 +#: src/authentic2/idp/saml/saml2_endpoints.py:1270 +#: src/authentic2/idp/saml/saml2_endpoints.py:1304 +#: src/authentic2/idp/saml/saml2_endpoints.py:1352 +#: src/authentic2/idp/saml/saml2_endpoints.py:1363 #, python-format msgid "You are being redirected to \"%s\"" msgstr "Vous allez être redirigé sur \"%s\"" -#: authentic2/idp/saml/saml2_endpoints.py:1354 +#: src/authentic2/idp/saml/saml2_endpoints.py:1355 msgid "Invalid logout request" msgstr "Requête de déconnexion invalide" -#: authentic2/idp/saml/templates/idp/saml/logout_fragment.html:2 +#: src/authentic2/idp/saml/templates/idp/saml/logout_fragment.html:2 #, python-format msgid "Sending logout to %(name)s...." msgstr "Déconnexion avec %(name)s...." -#: authentic2/idp/saml/templates/idp/saml/unknown_provider.html:5 +#: src/authentic2/idp/saml/templates/idp/saml/unknown_provider.html:5 #, python-format msgid "" "We were unable to load provider\n" @@ -102,11 +110,11 @@ msgstr "" "\"\">réessayer.\n" " " -#: authentic2/idp/saml/tests.py:234 +#: src/authentic2/idp/saml/tests.py:234 msgid "Cancel" msgstr "Annuler" -#: authentic2/idp/saml/views.py:26 +#: src/authentic2/idp/saml/views.py:26 #, python-brace-format msgid "Federation to {0} deleted" msgstr "La liaison avec {0} a été supprimée." diff --git a/src/authentic2/idp/saml/saml2_endpoints.py b/src/authentic2/idp/saml/saml2_endpoints.py index 0fe312c..9c80553 100644 --- a/src/authentic2/idp/saml/saml2_endpoints.py +++ b/src/authentic2/idp/saml/saml2_endpoints.py @@ -593,14 +593,15 @@ def continue_sso(request): % login.remoteProviderId, logger=logger) if 'cancel' in request.GET: logger.info('login canceled') + set_saml2_response_responder_status_code(login.response, - lasso.SAML2_STATUS_CODE_REQUEST_DENIED, _('User canceled login process'.decode('utf-8'))) + lasso.SAML2_STATUS_CODE_REQUEST_DENIED, _('User canceled login process').encode('utf-8')) return finish_sso(request, login) if consent_answer == 'refused': logger.info("consent answer treatment, the user " "refused, return request denied to the requester") set_saml2_response_responder_status_code(login.response, - lasso.SAML2_STATUS_CODE_REQUEST_DENIED, _('User refused to consent'.decode('utf-8'))) + lasso.SAML2_STATUS_CODE_REQUEST_DENIED, _('User refused to consent').encode('utf-8')) return finish_sso(request, login) if consent_answer == 'accepted': logger.info("consent answer treatment, the user " -- 2.6.1