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

mail template translation

parent 4bdb7888
No related branches found
No related tags found
No related merge requests found
...@@ -438,11 +438,13 @@ sub req_complete_challenge { ...@@ -438,11 +438,13 @@ sub req_complete_challenge {
); );
}; };
my $lang = HTTP::AcceptLanguage->new($ENV{HTTP_ACCEPT_LANGUAGE})->match(qw/en fr/) || 'en';
my $tt2 = Template->new({ my $tt2 = Template->new({
ENCODING => 'utf8', ENCODING => 'utf8',
INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} . "/mail/$lang"
}); });
my $template = 'mail/send_authentication_token.tt2.eml'; my $template = 'send_authentication_token.tt2.eml';
my $data = { my $data = {
env => { env => {
REMOTE_ADDR => $ENV{REMOTE_ADDR}, REMOTE_ADDR => $ENV{REMOTE_ADDR},
......
nobase_templates_DATA = \ nobase_templates_DATA = \
accountProfiles/valid-accounts.php.tt2 \ accountProfiles/valid-accounts.php.tt2 \
mail/send_authentication_token.tt2.eml \ mail/en/send_authentication_token.tt2.eml \
mail/fr/send_authentication_token.tt2.eml \
web/en/errors.tt2.html \ web/en/errors.tt2.html \
web/en/home.tt2.html \ web/en/home.tt2.html \
web/en/index.tt2.html \ web/en/index.tt2.html \
......
From: [% app.name %] <[% from %]>
To: [% to %]
Subject: [% app.name %] - Demande de comptes de test
Content-type: text/plain; charset=UTF-8; format=flowed
Ceci est un message envoyé automatiquement par l'application eduGAIN Access Check.
Quelqu'un avec l'adresse IP [% env.REMOTE_ADDR %] a demandé la création de comptes de test pour le service [% entityid %].
L'addresse [% to %] est mentionnée dans les métadonnées de la fédération eduGAIN comme contact pour ce service.
Pour terminer la création de ces comptes de test, recopiez le code de
validation suivant dans l'application eduGAIN Access Check.
Code de validation: [% token %]
[% app.name %]: [% app.url %]
Si la création de comptes de test n'a pas été demandée par vous ou un
autre administrateur du service mentionné plus haut, merci de
transmettre ce message à [% app.support_email %] afin d'informer
d'une utilisation inappropriée de l'application eduGAIN Access
Check.
Cordialement
[% app.name %] Bot
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment