localize many message from mail. re #53

This commit is contained in:
Sébastien Lucas 2013-07-23 07:20:58 +02:00
parent d35becb7fe
commit cf26e7438c
3 changed files with 8 additions and 4 deletions

View file

@ -330,5 +330,7 @@
"customize.paging":"Max number of books per page (-1 to disable)", "customize.paging":"Max number of books per page (-1 to disable)",
"customize.email":"Set your email (to allow book emailing)", "customize.email":"Set your email (to allow book emailing)",
"customize.filter":"Enable tag filtering", "customize.filter":"Enable tag filtering",
"mail.messagenotsent":"Message could not be sent.",
"mail.messagesent":"Message has been sent",
"fin":"fin" "fin":"fin"
} }

View file

@ -125,5 +125,7 @@
"customize.filter":"Filtrage via les étiquettes", "customize.filter":"Filtrage via les étiquettes",
"languages.eng":"Anglais", "languages.eng":"Anglais",
"languages.fra":"Français", "languages.fra":"Français",
"mail.messagenotsent":"Le message n'a pas pu être envoyé.",
"mail.messagesent":"Le message a été envoyé",
"fin":"fin" "fin":"fin"
} }

View file

@ -1,8 +1,8 @@
<?php <?php
require_once ("config.php"); require_once ("config.php");
require "resources/PHPMailer/class.phpmailer.php"; require_once "resources/PHPMailer/class.phpmailer.php";
require "book.php"; require_once "book.php";
if (is_null ($config['cops_mail_configuration']) || if (is_null ($config['cops_mail_configuration']) ||
!is_array ($config['cops_mail_configuration']) || !is_array ($config['cops_mail_configuration']) ||
@ -57,10 +57,10 @@ $mail->Subject = 'Sent by COPS';
$mail->Body = 'Sent by COPS'; $mail->Body = 'Sent by COPS';
if(!$mail->Send()) { if(!$mail->Send()) {
echo 'Message could not be sent.'; echo localize ("mail.messagenotsent");
echo 'Mailer Error: ' . $mail->ErrorInfo; echo 'Mailer Error: ' . $mail->ErrorInfo;
exit; exit;
} }
echo 'Message has been sent'; echo localize ("mail.messagesent");