Mails are more nice (using HTML and fixing missing keys)

This commit is contained in:
Olivier PEREZ 2015-04-08 22:25:14 +02:00
parent 77234edc82
commit 64790496a5
6 changed files with 38 additions and 38 deletions

View File

@ -96,20 +96,20 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
// Send confirmation by mail if enabled
if ($config['use_smtp'] === true) {
$message = __("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message .= "\n\n";
$message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, "UTF-8")) . ' ' . __('hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n";
$message .= __('Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
$message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message .= '<br/><br/>';
$message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title, ENT_QUOTES) . '".<br/>';
$message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION;
$message_admin = __("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin .= " :\n\n" . "%s \n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
$message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin .= ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION;
$message = sprintf($message, Utils::getUrlSondage($poll_id));
$message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true));
if ($mailService->isValidEmail($_SESSION['form']->admin_mail)) {
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Author\'s message') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('For sending to the polled users') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message_admin);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message);
}
}

View File

@ -95,19 +95,19 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) ||
// Send confirmation by mail if enabled
if ($config['use_smtp'] === true) {
$message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message .= "\n\n";
$message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, 'UTF-8')) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n";
$message .= __('Mail', 'Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Mail', 'Thanks for your confidence.') . "\n" . NOMAPPLICATION;
$message .= '<br/><br/>';
$message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title) . '".<br/>';
$message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION;
$message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin .= " :\n\n" . "%s \n\n" . __('Mail', 'Thanks for your confidence.') . "\n" . NOMAPPLICATION;
$message_admin .= ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION;
$message = sprintf($message, Utils::getUrlSondage($poll_id));
$message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true));
if ($mailService->isValidEmail($_SESSION['form']->admin_mail)) {
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message_admin);
$mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message);
}
}

View File

@ -288,17 +288,17 @@
},
"Mail": {
"Poll's participation": "Beteiligung an der Umfrage",
"filled a vote.\nYou can find your poll at the link": "füllte eine Stimme.\nSie können Ihre Umfrage unter dem Link zu finden",
"updated a vote.\nYou can find your poll at the link": "eine Abstimmung regelmäßig aktualisiert.\nSie können Ihre Umfrage unter dem Link zu finden",
"wrote a comment.\nYou can find your poll at the link": "hat einen Kommentar. Sie können Ihre Umfrage unter dem Link zu finden",
"filled a vote.\nYou can find your poll at the link": "füllte eine Stimme.<br/>Sie können Ihre Umfrage unter dem Link zu finden",
"updated a vote.\nYou can find your poll at the link": "eine Abstimmung regelmäßig aktualisiert.<br/>Sie können Ihre Umfrage unter dem Link zu finden",
"wrote a comment.\nYou can find your poll at the link": "hat einen Kommentar.<br/>Sie können Ihre Umfrage unter dem Link zu finden",
"Thanks for your confidence.": "Danke für Ihr Vertrauen.",
"FOOTER": "",
"[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATOR] Neue Einstellungen für Ihre Umfrage ",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "Sie haben die Einstellungen Ihrer Umfrage verändert.\nSie können diese Umfrage mit diesem Link ändern",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Dies ist die Botschaft, die Sie zu den Menschen, die Sie abfragen möchten senden.\nNun haben Sie diese Nachricht an alle, die Sie abfragen möchten senden.",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "Sie haben die Einstellungen Ihrer Umfrage verändert.<br/>Sie können diese Umfrage mit diesem Link ändern",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Dies ist die Botschaft, die Sie zu den Menschen, die Sie abfragen möchten senden.<br/>Nun haben Sie diese Nachricht an alle, die Sie abfragen möchten senden.",
"hast just created a poll called": " hat eine Umfrage erstellt - Name folgt: ",
"Thanks for filling the poll at the link above": "Danke, dass Sie die Umfrage unter dem obrigen Link ausgefüllt haben",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Diese Meldung sollte nicht auf die befragten Personen gesendet werden. Es ist privat für die Umfrage Schöpfer.\n\nSie können nun ändern sie unter dem Link oben",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Diese Meldung sollte nicht auf die befragten Personen gesendet werden. Es ist privat für die Umfrage Schöpfer.<br/><br/>Sie können nun ändern sie unter dem Link oben",
"Author's message": "Nachricht vom Autor ",
"For sending to the polled users": "Nachricht für die Teilnehmer"
},

View File

@ -288,17 +288,17 @@
},
"Mail" : {
"Poll's participation": "Poll's participation",
"filled a vote.\nYou can find your poll at the link": "filled a vote.\nYou can find your poll at the link",
"updated a vote.\nYou can find your poll at the link": "updated a vote.\nYou can find your poll at the link",
"wrote a comment.\nYou can find your poll at the link": "wrote a comment.\nYou can find your poll at the link",
"filled a vote.\nYou can find your poll at the link": "filled a vote.<br/>You can find your poll at the link",
"updated a vote.\nYou can find your poll at the link": "updated a vote.<br/>You can find your poll at the link",
"wrote a comment.\nYou can find your poll at the link": "wrote a comment.<br/>You can find your poll at the link",
"Thanks for your confidence.": "Thanks for your confidence.",
"FOOTER": "",
"[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATOR] New settings for your poll",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "You have changed the settings of your poll. \nYou can modify this poll with this link",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.":"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "You have changed the settings of your poll.<br/>You can modify this poll with this link",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.":"This is the message you have to send to the people you want to poll.<br/>Now, you have to send this message to everyone you want to poll.",
"hast just created a poll called": "has just created a poll called",
"Thanks for filling the poll at the link above": "Thanks for filling the poll at the link above",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "This message should NOT be sent to the polled people. It is private for the poll's creator.<br/><br/>You can now modify it at the link above",
"Author's message": "Author's message",
"For sending to the polled users": "For sending to the polled users"
},

View File

@ -288,17 +288,17 @@
},
"Mail": {
"Poll's participation": "ES_Participation au sondage",
"filled a vote.\nYou can find your poll at the link": "ES_vient de voter.\nVous pouvez retrouver votre sondage avec le lien suivant",
"updated a vote.\nYou can find your poll at the link": "ES_vient de mettre à jour un vote.\nVous pouvez retrouver votre sondage avec le lien suivant",
"wrote a comment.\nYou can find your poll at the link": "ES_vient de rédiger un commentaire.\nVous pouvez retrouver votre sondage avec le lien suivant",
"filled a vote.\nYou can find your poll at the link": "ES_vient de voter.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"updated a vote.\nYou can find your poll at the link": "ES_vient de mettre à jour un vote.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"wrote a comment.\nYou can find your poll at the link": "ES_vient de rédiger un commentaire.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"Thanks for your confidence.": "ES_Merci de votre confiance.",
"FOOTER": "",
"[ADMINISTRATOR] New settings for your poll": "ES_[ADMINISTRATEUR] Changement de configuration du sondage",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "ES_Vous avez modifié la configuration de votre sondage. \nVous pouvez modifier ce sondage avec le lien suivant",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "ES_Ceci est le message qui doit être envoyé aux sondés. \nVous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "ES_Vous avez modifié la configuration de votre sondage.<br/>Vous pouvez modifier ce sondage avec le lien suivant",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "ES_Ceci est le message qui doit être envoyé aux sondés.<br/>Vous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"hast just created a poll called": "ES_ vient de créer un sondage intitulé ",
"Thanks for filling the poll at the link above": "ES_Merci de bien vouloir participer au sondage à l'adresse suivante",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "ES_Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.\n\nVous pouvez modifier ce sondage à l'adresse suivante ",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "ES_Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.<br/><br/>Vous pouvez modifier ce sondage à l'adresse suivante ",
"Author's message": "Reservado al autor",
"For sending to the polled users": "ES_Pour diffusion aux sondés"
},

View File

@ -288,17 +288,17 @@
},
"Mail": {
"Poll's participation": "Participation au sondage",
"filled a vote.\nYou can find your poll at the link": "vient de voter.\nVous pouvez retrouver votre sondage avec le lien suivant",
"updated a vote.\nYou can find your poll at the link": "vient de mettre à jour un vote.\nVous pouvez retrouver votre sondage avec le lien suivant",
"wrote a comment.\nYou can find your poll at the link": "vient de rédiger un commentaire.\nVous pouvez retrouver votre sondage avec le lien suivant",
"filled a vote.\nYou can find your poll at the link": "vient de voter.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"updated a vote.\nYou can find your poll at the link": "vient de mettre à jour un vote.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"wrote a comment.\nYou can find your poll at the link": "vient de rédiger un commentaire.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"Thanks for your confidence.": "Merci de votre confiance.",
"FOOTER": "<hr/><br/>« La route est longue, mais la voie est libre… »<br/>Framasoft ne vit que par vos dons (déductibles des impôts).<br/>Merci d'avance pour votre soutien http://soutenir.framasoft.org.",
"[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATEUR] Changement de configuration du sondage",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "Vous avez modifié la configuration de votre sondage. \nVous pouvez modifier ce sondage avec le lien suivant",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Ceci est le message qui doit être envoyé aux sondés. \nVous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "Vous avez modifié la configuration de votre sondage.<br/>Vous pouvez modifier ce sondage avec le lien suivant",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Ceci est le message qui doit être envoyé aux sondés.<br/>Vous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"hast just created a poll called": " vient de créer un sondage intitulé ",
"Thanks for filling the poll at the link above": "Merci de bien vouloir participer au sondage à l'adresse suivante",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.\n\nVous pouvez modifier ce sondage à l'adresse suivante ",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.<br/><br/>Vous pouvez modifier ce sondage à l'adresse suivante ",
"Author's message": "Réservé à l'auteur",
"For sending to the polled users": "Pour diffusion aux sondés"
},