From 2f7b48d14294fec3407c82a85980171b66ae1ec5 Mon Sep 17 00:00:00 2001
From: Antonin <zepcome@gmail.com>
Date: Mon, 2 May 2016 15:13:38 +0200
Subject: [PATCH] Improved the email template for finding polls

---
 find_polls.php          |  2 +-
 locale/de.json          |  7 ++++++-
 locale/en.json          |  8 +++++++-
 locale/es.json          |  7 ++++++-
 locale/fr.json          |  7 ++++++-
 locale/it.json          |  7 ++++++-
 locale/oc.json          |  7 ++++++-
 tpl/mail/find_polls.tpl | 12 ++++++++++--
 8 files changed, 48 insertions(+), 9 deletions(-)

diff --git a/find_polls.php b/find_polls.php
index c4ced251..302afbd8 100644
--- a/find_polls.php
+++ b/find_polls.php
@@ -43,7 +43,7 @@ if (!empty($_POST['mail'])) {
             $smarty->assign('polls', $polls);
             $body = $smarty->fetch('mail/find_polls.tpl');
 
-            $mailService->send($mail, __('Homepage', 'Where are my polls'), $body, 'SEND_POLLS');
+            $mailService->send($mail, __('FindPolls', 'List of your polls').' - '.NOMAPPLICATION, $body, 'SEND_POLLS');
             $message = new Message('success', __('FindPolls', 'Polls sent'));
         } else {
             $message = new Message('warning', __('Error', 'No polls found'));
diff --git a/locale/de.json b/locale/de.json
index 639b7c3b..8227cb4d 100644
--- a/locale/de.json
+++ b/locale/de.json
@@ -314,7 +314,12 @@
     "FindPolls": {
         "Here are your polls": "Hier sind Ihre Umfragen",
         "Send me my polls": "Senden Sie mir mein Umfragen",
-        "Polls sent": "Umfragen abgeschickt"
+        "Polls sent": "Umfragen abgeschickt",
+        "List of your polls": "DE_Liste de vos sondages",
+        "Here is the list of the polls that you manage on %s:": "DE_Voici la liste des sondages que vous administrez sur %s :",
+        "Have a good day!": "DE_Bonne journée !",
+        "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "DE_PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
+        "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "DE_Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
     },
     "Mail": {
         "Poll's participation: %s": "Beteiligung an der Umfrage: %s",
diff --git a/locale/en.json b/locale/en.json
index 657cf8a2..4e1e7e29 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -314,7 +314,13 @@
   "FindPolls": {
     "Here are your polls": "Here are your polls",
     "Send me my polls": "Send me my polls",
-    "Polls sent": "Polls sent"
+    "Polls sent": "Polls sent",
+    "List of your polls": "List of your polls",
+    "Here is the list of the polls that you manage on %s:": "Here is the list of the polls that you manage on %s:",
+    "Have a good day!": "Have a good day!",
+    "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.",
+    "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s."
+
   },
   "Mail" : {
     "Poll's participation: %s": "Poll participation: %s",
diff --git a/locale/es.json b/locale/es.json
index 41f9fe92..11343067 100644
--- a/locale/es.json
+++ b/locale/es.json
@@ -314,7 +314,12 @@
   "FindPolls": {
     "Here are your polls": "Esas son sus encuestas",
     "Send me my polls": "Enviarme mis encuestas",
-    "Polls sent": "Encuestas enviadas"
+    "Polls sent": "Encuestas enviadas",
+    "List of your polls": "ES_Liste de vos sondages",
+    "Here is the list of the polls that you manage on %s:": "ES_Voici la liste des sondages que vous administrez sur %s :",
+    "Have a good day!": "ES_Bonne journée !",
+    "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "ES_PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
+    "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "ES_Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
   },
   "Mail": {
     "Poll's participation: %s": "Participación a la encuesta: %s",
diff --git a/locale/fr.json b/locale/fr.json
index 231de104..a7b94c77 100644
--- a/locale/fr.json
+++ b/locale/fr.json
@@ -313,7 +313,12 @@
   "FindPolls": {
     "Here are your polls": "Voici tes sondages",
     "Send me my polls": "Envoyer mes sondages",
-    "Polls sent": "Sondages envoyés"
+    "Polls sent": "Sondages envoyés",
+    "List of your polls": "Liste de vos sondages",
+    "Here is the list of the polls that you manage on %s:": "Voici la liste des sondages que vous administrez sur %s :",
+    "Have a good day!": "Bonne journée !",
+    "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
+    "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
   },
   "Mail": {
     "Poll's participation: %s": "Participation au sondage : %s",
diff --git a/locale/it.json b/locale/it.json
index 3ec4d9a4..6d9f895c 100644
--- a/locale/it.json
+++ b/locale/it.json
@@ -314,7 +314,12 @@
   "FindPolls": {
     "Here are your polls": "Ecco i tuoi sondaggi",
     "Send me my polls": "Inviare i miei sondaggi",
-    "Polls sent": "Sondaggi inviati"
+    "Polls sent": "Sondaggi inviati",
+    "List of your polls": "IT_Liste de vos sondages",
+    "Here is the list of the polls that you manage on %s:": "IT_Voici la liste des sondages que vous administrez sur %s :",
+    "Have a good day!": "IT_Bonne journée !",
+    "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "IT_PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
+    "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "IT_Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
   },
   "Mail": {
     "Poll's participation: %s": "Partecipazione al sondaggio: %s",
diff --git a/locale/oc.json b/locale/oc.json
index cb3d208d..b25dbd4f 100644
--- a/locale/oc.json
+++ b/locale/oc.json
@@ -298,7 +298,12 @@
   "FindPolls": {
     "Here are your polls": "Vaquí vòstres sondatges",
     "Send me my polls": "Mandar mos sondatges",
-    "Polls sent": "Sondatges mandats"
+    "Polls sent": "Sondatges mandats",
+    "List of your polls": "OC_Liste de vos sondages",
+    "Here is the list of the polls that you manage on %s:": "OC_Voici la liste des sondages que vous administrez sur %s :",
+    "Have a good day!": "OC_Bonne journée !",
+    "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "OC_PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
+    "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "OC_Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
   },
   "Mail": {
     "Poll's participation: %s": "Participacion al sondatge : %s",
diff --git a/tpl/mail/find_polls.tpl b/tpl/mail/find_polls.tpl
index 478561b0..933f4acc 100644
--- a/tpl/mail/find_polls.tpl
+++ b/tpl/mail/find_polls.tpl
@@ -1,4 +1,4 @@
-<h1>{__('FindPolls', 'Here are your polls')}</h1>
+<p>{__f('FindPolls', 'Here is the list of the polls that you manage on %s:', $smarty.const.NOMAPPLICATION)}</p>
 <ul>
     {foreach $polls as $poll}
         <li>
@@ -6,4 +6,12 @@
             ({__('Generic', 'Creation date:')} {$poll->creation_date|date_format:$date_format['txt_full']})
         </li>
     {/foreach}
-</ul>
\ No newline at end of file
+</ul>
+<p>{__('FindPolls','Have a good day!')}</p>
+<p>
+    <i>
+        {__('FindPolls','PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.')}
+        {capture name="email_url"}<a href="mailto:{$smarty.const.ADRESSEMAILADMIN}">{$smarty.const.ADRESSEMAILADMIN}</a>{/capture}
+        {__f('FindPolls',"If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.", $smarty.capture.email_url)}
+    </i>
+</p>
\ No newline at end of file
-- 
GitLab