From 072215a071afccbeb3be29709afbe4eefe857238 Mon Sep 17 00:00:00 2001
From: Daniel Berteaud
Date: Wed, 14 May 2014 17:30:28 +0200
Subject: [PATCH] Add custom message intro in email invitation Also don't XML
escape translated strings in the plain text version
---
lib/Vroom/I18N/en.pm | 1 +
lib/Vroom/I18N/fr.pm | 1 +
templates/default/invite.email_html.ep | 3 +++
templates/default/invite.email_text.ep | 8 +++++---
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm
index 7ed7fdb..494cd3e 100644
--- a/lib/Vroom/I18N/en.pm
+++ b/lib/Vroom/I18N/en.pm
@@ -18,6 +18,7 @@ our %Lexicon = (
"A_WEBCAM" => "A webcam",
"A_MIC" => "A microphone",
"WHEN_YOU_ARE_READY" => "When you are ready, go to this address to join the conference",
+ "MESSAGE_FROM_ORGANIZER" => "Message from the meeting organizer",
"HAVE_A_NICE_MEETING" => "Have a nice meeting :-)",
"EMAIL_SIGN" => "VROOM! And video conferencing becomes free, simple and safe",
"FEEDBACK" => "Feedback",
diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm
index e014f67..4e1c037 100644
--- a/lib/Vroom/I18N/fr.pm
+++ b/lib/Vroom/I18N/fr.pm
@@ -20,6 +20,7 @@ our %Lexicon = (
"A_WEBCAM" => "Une webcam",
"A_MIC" => "Un micro",
"WHEN_YOU_ARE_READY" => "Quand vous êtes prêt, rendez-vous sur cette adresse pour joindre la conférence",
+ "MESSAGE_FROM_ORGANIZER" => "Message de l'organisateur de la réunion",
"HAVE_A_NICE_MEETING" => "Bonne réunion :-)",
"EMAIL_SIGN" => "VROOM! Et la visio conférence devient libre, simple et sûr",
"FEEDBACK" => "Retour d'expérience",
diff --git a/templates/default/invite.email_html.ep b/templates/default/invite.email_html.ep
index 23a1b23..4d93c13 100644
--- a/templates/default/invite.email_html.ep
+++ b/templates/default/invite.email_html.ep
@@ -28,6 +28,9 @@
<% if ($message && $message ne ''){ %>
+ <%=l 'MESSAGE_FROM_ORGANIZER' %>:
+
+
<%= $message %>
<% } %>
diff --git a/templates/default/invite.email_text.ep b/templates/default/invite.email_text.ep
index 6acbcd8..b8fc589 100644
--- a/templates/default/invite.email_text.ep
+++ b/templates/default/invite.email_text.ep
@@ -2,7 +2,7 @@
my $url = $self->url_for('/')->to_abs;
$url .= ($url =~ m/\/$/) ? '' : '/';
%>
-<%=l 'YOU_ARE_INVITED_TO_A_MEETING' %>
+<%==l 'YOU_ARE_INVITED_TO_A_MEETING' %>
* <%=l 'A_MODERN_BROWSER' %>
* <%=l 'A_WEBCAM' %>
@@ -10,12 +10,14 @@
<%=l 'WHEN_YOU_ARE_READY' %>
-<%= $url . $room %>
+<%== $url . $room %>
<% if ($message && $message ne ''){ %>
+<%==l 'MESSAGE_FROM_ORGANIZER' %>:
+
<%== $message %>
<% } %>
<%=l 'HAVE_A_NICE_MEETING' %>
--
-<%=l 'EMAIL_SIGN' %>
+<%==l 'EMAIL_SIGN' %>