Skip to content
Snippets Groups Projects
Commit e2dfb888 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

add translation for new error messages

parent 5a6e75f1
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,7 @@ sub check_csrf_token { ...@@ -133,7 +133,7 @@ sub check_csrf_token {
return $self->abort( return $self->abort(
status => 403, status => 403,
log_message => sprintf("missing anti-CSRF token for action %s", $self->current_route()), log_message => sprintf("missing anti-CSRF token for action %s", $self->current_route()),
user_message => "missing CSRF token" user_message => "missing_csrf_token"
) if !$provided_token; ) if !$provided_token;
my $expected_token = $self->csrf_token(); my $expected_token = $self->csrf_token();
...@@ -146,7 +146,7 @@ sub check_csrf_token { ...@@ -146,7 +146,7 @@ sub check_csrf_token {
$provided_token, $provided_token,
$expected_token, $expected_token,
), ),
user_message => "invalid CSRF token" user_message => "invalid_csrf_token"
) if $provided_token ne $expected_token; ) if $provided_token ne $expected_token;
return 1; return 1;
......
...@@ -296,6 +296,11 @@ msgstr "Les attributs eduPersonAffiliation et eduPersonScopedAffiliation sont va ...@@ -296,6 +296,11 @@ msgstr "Les attributs eduPersonAffiliation et eduPersonScopedAffiliation sont va
#: templates/web/edugain/errors.tt2.html:12 templates/web/renater/errors.tt2.html:12 #: templates/web/edugain/errors.tt2.html:12 templates/web/renater/errors.tt2.html:12
msgid "internal error" msgid "internal error"
msgstr "erreur interne" msgstr "erreur interne"
#: templates/web/edugain/errors.html.tt2:35 templates/web/renater/errors.html.tt2:32
msgid "invalid CSRF token"
msgstr "jeton CSRF invalide"
#. (matches.0) #. (matches.0)
#: templates/web/edugain/errors.html.tt2:35 #: templates/web/edugain/errors.html.tt2:35
msgid "invalid parameter '%1'" msgid "invalid parameter '%1'"
...@@ -305,6 +310,10 @@ msgstr "paramètre invalide '%1'" ...@@ -305,6 +310,10 @@ msgstr "paramètre invalide '%1'"
msgid "mail notification failure" msgid "mail notification failure"
msgstr "échec de notification par mail" msgstr "échec de notification par mail"
#: templates/web/edugain/errors.html.tt2:32 templates/web/renater/errors.html.tt2:29
msgid "missing CSRF token"
msgstr "jeton CSRF manquant"
#. (matches.0) #. (matches.0)
#: templates/web/edugain/errors.tt2.html:30 templates/web/renater/errors.tt2.html:30 #: templates/web/edugain/errors.tt2.html:30 templates/web/renater/errors.tt2.html:30
msgid "missing parameter '%1'" msgid "missing parameter '%1'"
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
[% ELSIF error == 'no_displayname_attribute' %] [% ELSIF error == 'no_displayname_attribute' %]
[% c.loc("your identity provider doesn't provide displayName attribute, required for this application") %] [% c.loc("your identity provider doesn't provide displayName attribute, required for this application") %]
[% ELSIF error == 'missing_csrf_token' %]
[% c.loc("missing CSRF token") %]
[% ELSIF error == 'invalid_csrf_token' %]
[% c.loc("invalid CSRF token") %]
[% ELSIF (matches = error.match('missing_(\w+)')) %] [% ELSIF (matches = error.match('missing_(\w+)')) %]
[% c.loc("missing parameter '[_1]'", matches.0) %] [% c.loc("missing parameter '[_1]'", matches.0) %]
......
...@@ -25,10 +25,16 @@ ...@@ -25,10 +25,16 @@
[% ELSIF error == 'unauthenticated' %] [% ELSIF error == 'unauthenticated' %]
[% c.loc("you need to authenticate to access this page") %] [% c.loc("you need to authenticate to access this page") %]
[% ELSIF error == 'missing_csrf_token' %]
[% c.loc("missing CSRF token") %]
[% ELSIF error == 'invalid_csrf_token' %]
[% c.loc("invalid CSRF token") %]
[% ELSIF (matches = error.match('missing_(\w+)')) %] [% ELSIF (matches = error.match('missing_(\w+)')) %]
[% c.loc("missing parameter '[_1]'", matches.0) %] [% c.loc("missing parameter '[_1]'", matches.0) %]
[% ELSIF (matches = error.match('invalid_(\w+)')) %] [% ELSIF (matches = error.match('invalid_(\w+)')) %]
[% c.loc("invalid parameter '[_1]'", matches.0) %] [% c.loc("invalid parameter '[_1]'", matches.0) %]
[% ELSE %] [% ELSE %]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment