From fc235cefeb3cd730b18411773e474ba18de2704a Mon Sep 17 00:00:00 2001 From: Antonin <zepcome@gmail.com> Date: Mon, 2 May 2016 11:53:47 +0200 Subject: [PATCH] Using o80::i18n shortcut and cleaning --- action/send_edit_link_by_email_action.php | 6 +++--- locale/fr.json | 2 +- tpl/part/form_remember_edit_link.tpl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/action/send_edit_link_by_email_action.php b/action/send_edit_link_by_email_action.php index eff06fdd..f7f214b8 100644 --- a/action/send_edit_link_by_email_action.php +++ b/action/send_edit_link_by_email_action.php @@ -64,7 +64,7 @@ if (is_null($message)) { $remainingTime = TIME_EDIT_LINK_EMAIL - (time() - $time); if ($remainingTime > 0) { - $message = new Message('error', sprintf(__('EditLink', 'Please wait %d seconds before we can send an email to you then try again.'), $remainingTime)); + $message = new Message('error', __f('EditLink', 'Please wait %d seconds before we can send an email to you then try again.', $remainingTime)); } } } @@ -78,7 +78,7 @@ if (is_null($message)) { $smarty->assign('editedVoteUniqueId', $editedVoteUniqueId); $body = $smarty->fetch('mail/remember_edit_link.tpl'); - $subject = '[' . NOMAPPLICATION . ']['.__('EditLink', 'REMINDER').'] '.sprintf(__('EditLink', 'Edit link for poll "%s"'), $poll->title); + $subject = '[' . NOMAPPLICATION . ']['.__('EditLink', 'REMINDER').'] '.__f('EditLink', 'Edit link for poll "%s"', $poll->title); //$mailService->send($email, $subject, $body); $sessionService->remove("Common", SESSION_EDIT_LINK_TOKEN); @@ -92,7 +92,7 @@ if (is_null($message)) { error_reporting(E_ALL & ~E_NOTICE); $smarty->error_reporting = E_ALL & ~E_NOTICE; -$response = array('result' => $result, 'message' => $message, '$email'=> $email, '$subject'=>$subject, '$body'=>$body); +$response = array('result' => $result, 'message' => $message); echo json_encode($response); \ No newline at end of file diff --git a/locale/fr.json b/locale/fr.json index b9ed6801..55293638 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -185,7 +185,7 @@ "The email address is not correct.": "Courriel incorrect.", "REMINDER": "RAPPEL", "Edit link for poll \"%s\"": "Lien d'édition du sondage \"%s\"", - "Please wait %d seconds before we can send an email to you then try again.": "Veuillez patienter encore %d seconds avant que nous puissions vous envoyer un email, puis réessayez.", + "Please wait %d seconds before we can send an email to you then try again.": "Veuillez patienter encore %d secondes avant que nous puissions vous envoyer un email, puis réessayez.", "Here is the link for editing your vote:": "Voici le lien pour éditer votre vote :", "Your reminder has been successfully sent!": "Votre rappel a été envoyé avec succès !" }, diff --git a/tpl/part/form_remember_edit_link.tpl b/tpl/part/form_remember_edit_link.tpl index 6cf61836..5e0d6dcb 100644 --- a/tpl/part/form_remember_edit_link.tpl +++ b/tpl/part/form_remember_edit_link.tpl @@ -1,6 +1,6 @@ <div class="well"> <form action="action/send_edit_link_by_email_action.php" method="POST" class="form-inline" id="send_edit_link_form"> - <p>{__('EditLink', 'If you don't want to lose your personalized link, we can send it to your email.')}</p> + <p>{__('EditLink', "If you don't want to lose your personalized link, we can send it to your email.")}</p> <input type="hidden" name="token" value="{$token}"/> <input type="hidden" name="poll" value="{$poll_id}"/> <input type="hidden" name="editedVoteUniqueId" value="{$editedVoteUniqueId}"/> -- GitLab