From 9daef4b09edd3fc2eae6f28e69405ee76e2ae993 Mon Sep 17 00:00:00 2001
From: Olivier Perez <olivier@olivierperez.fr>
Date: Wed, 23 Sep 2015 13:47:35 +0200
Subject: [PATCH] Use __f to format some messages

---
 adminstuds.php | 2 +-
 locale/de.json | 4 ++--
 locale/en.json | 4 ++--
 locale/es.json | 4 ++--
 locale/fr.json | 4 ++--
 locale/it.json | 4 ++--
 studs.php      | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/adminstuds.php b/adminstuds.php
index a7c8931e..ac3661dc 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -67,7 +67,7 @@ function sendUpdateNotification($poll, $mailService, $type) {
 
     if ($poll->receiveNewVotes) {
 
-        $subject = '[' . NOMAPPLICATION . '] ' . __('Mail', 'Notification of poll') . ': ' . $poll->title;
+        $subject = '[' . NOMAPPLICATION . '] ' . __f('Mail', 'Notification of poll: %s', $poll->title);
 
         $message = '';
         switch ($type) {
diff --git a/locale/de.json b/locale/de.json
index 2b49864c..c9d4132c 100644
--- a/locale/de.json
+++ b/locale/de.json
@@ -293,8 +293,8 @@
         "Polls sent": "Umfragen abgeschickt"
     },
     "Mail": {
-        "Poll's participation": "Beteiligung an der Umfrage",
-        "Notification of poll": "Mitteilung bezüglich der Umfrage",
+        "Poll's participation: %s": "Beteiligung an der Umfrage: %s",
+        "Notification of poll: %s": "Mitteilung bezüglich der Umfrage: %s",
         "filled a vote.\nYou can find your poll at the link": "hat abgestimmt.<br/>Sie finden Ihre Umfrage über den Link",
         "updated a vote.\nYou can find your poll at the link": "hat eine Wertung aktualisiert.<br/>Sie finden Ihre Umfrage über den Link",
         "wrote a comment.\nYou can find your poll at the link": "hat einen Kommentar geschrieben.<br/>Sie finden Ihre Umfrage über den Link",
diff --git a/locale/en.json b/locale/en.json
index e9fa7b4f..568b611f 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -291,8 +291,8 @@
     "Polls sent": "Polls sent"
   },
   "Mail" : {
-    "Poll's participation": "Poll participation",
-    "Notification of poll": "Notification of poll",
+    "Poll's participation: %s": "Poll participation: %s",
+    "Notification of poll: %s": "Notification of poll: %s",
     "filled a vote.\nYou can find your poll at the link": "added a vote.<br/>You can visit your poll at the link",
     "updated a vote.\nYou can find your poll at the link": "updated a vote.<br/>You can visit your poll at the link",
     "wrote a comment.\nYou can find your poll at the link": "wrote a comment.<br/>You can visit your poll at the link",
diff --git a/locale/es.json b/locale/es.json
index 7c655dad..56ffe18b 100644
--- a/locale/es.json
+++ b/locale/es.json
@@ -293,8 +293,8 @@
         "Polls sent": "ES_Sondages envoyés"
     },
     "Mail": {
-        "Poll's participation": "Participación Encuesta",
-        "Notification of poll": "Notificación de la encuesta",
+        "Poll's participation: %s": "Participación Encuesta: %s",
+        "Notification of poll: %s": "Notificación de la encuesta: %s",
         "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",
diff --git a/locale/fr.json b/locale/fr.json
index 4c267f0b..6f84c9e7 100644
--- a/locale/fr.json
+++ b/locale/fr.json
@@ -293,8 +293,8 @@
     "Polls sent": "Sondages envoyés"
   },
   "Mail": {
-    "Poll's participation": "Participation au sondage",
-    "Notification of poll": "Notification d'un sondage",
+    "Poll's participation: %s": "Participation au sondage : %s",
+    "Notification of poll: %s": "Notification d'un sondage : %s",
     "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",
diff --git a/locale/it.json b/locale/it.json
index 5866317a..564ca7f1 100644
--- a/locale/it.json
+++ b/locale/it.json
@@ -293,8 +293,8 @@
     "Polls sent": "IT_Sondages envoyés"
   },
   "Mail": {
-    "Poll's participation": "Partecipazione al sondaggio",
-    "Notification of poll": "Notifica di sondaggio",
+    "Poll's participation: %s": "Partecipazione al sondaggio: %s",
+    "Notification of poll: %s": "Notifica di sondaggio: %s",
     "filled a vote.\nYou can find your poll at the link": "IT_vient de voter.\nVous pouvez retrouver votre sondage avec le lien suivant",
     "updated a vote.\nYou can find your poll at the link": "IT_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": "IT_vient de rédiger un commentaire.\nVous pouvez retrouver votre sondage avec le lien suivant",
diff --git a/studs.php b/studs.php
index ec7d274f..abde6ed8 100644
--- a/studs.php
+++ b/studs.php
@@ -66,7 +66,7 @@ function sendUpdateNotification($poll, $mailService, $name, $type) {
 
     if ($poll->receiveNewVotes) {
 
-        $subject = '[' . NOMAPPLICATION . '] ' . __('Mail', 'Poll\'s participation') . ': ' . $poll->title;
+        $subject = '[' . NOMAPPLICATION . '] ' . __f('Mail', 'Poll\'s participation: %s', $poll->title);
 
         $message = $name . ' ';
         switch ($type) {
-- 
GitLab