Some more email invitation refactoring

master
Daniel Berteaud 11 years ago
parent 1d8ad29190
commit f65932fee1
  1. 12
      lib/Mojolicious/Plugin/Mailer.pm
  2. 9
      lib/Vroom/I18N/en.pm
  3. 12
      lib/Vroom/I18N/fr.pm
  4. 1
      public/vroom.pl
  5. 40
      templates/default/invite.email_html.ep
  6. 10
      templates/default/invite.email_text.ep

@ -28,23 +28,25 @@ sub register {
Email::MIME->create(
body => Encode::encode('UTF-8', $self->render(
@data,
format => $args->{format} ? $args->{format} : 'email_html',
format => $args->{format} ? $args->{format} : 'email_text',
partial => 1
)),
attributes => {
charset => 'utf-8',
content_type => 'text/html',
encoding => '7bit',
content_type => 'text/plain',
}
),
Email::MIME->create(
body => Encode::encode('UTF-8', $self->render(
@data,
format => $args->{format} ? $args->{format} : 'email_text',
format => $args->{format} ? $args->{format} : 'email_html',
partial => 1
)),
attributes => {
charset => 'utf-8',
content_type => 'text/plain',
encoding => '7bit',
content_type => 'text/html',
}
),
);
@ -64,7 +66,7 @@ sub register {
);
$email->charset_set ( $args->{charset} ? $args->{charset} : 'utf-8' );
$email->content_type_set( $args->{content_type} ? $args->{content_type} : 'text/html' );
$email->content_type_set( $args->{content_type} ? $args->{content_type} : 'multipart/alternative' );
return Email::Sender::Simple->try_to_send( $email, { transport => $transport } ) if $transport;

@ -12,9 +12,12 @@ our %Lexicon = (
"ERROR_NOT_LOGGED_IN" => "Sorry, your not logged in",
"EMAIL_INVITATION" => "Video conference invitation",
"INVITE_SENT_TO_s" => "An invitation was sent to %s",
"TO_JOIN_CLICK_THIS_LINK" => "You're invited to join a video conference. " .
"All you need is a modern web browser and a webcam. When you're ready, " .
"just go to this address",
"YOU_ARE_INVITED_TO_A_MEETING" => "You are awaited on a video conferecing room. " .
"Before joining it, make sure you have all the necessary",
"A_MODERN_BROWSER" => "A modern web browser, recent versions of Mozilla Firefox, Google Chrome or Opera will work",
"A_WEBCAM" => "A webcam",
"A_MIC" => "A microphone",
"WHEN_YOU_ARE_READY" => "When you are ready, go to this address to join the conference",
"HAVE_A_NICE_MEETING" => "Have a nice meeting :-)",
"EMAIL_SIGN" => "VROOM! And video conferencing becomes free, simple and safe",
"FEEDBACK" => "Feedback",

@ -12,10 +12,14 @@ our %Lexicon = (
"ERROR_ROOM_s_LOCKED" => "Le salon %s est verrouillé, vous ne pouvez pas le rejoindre",
"ERROR_OCCURED" => "Une erreur est survenue",
"ERROR_NOT_LOGGED_IN" => "Désolé, vous n'êtes pas identifié",
"EMAIL_INVITATION" => "Vidéo conférence",
"TO_JOIN_CLICK_THIS_LINK" => "Vous êtes attendu sur un salon de vidéo conférence. " .
"Tout ce dont vous avez besoin est un navigateur web récent et " .
"une webcam. Quand vous êtes prêt, rendez-vous sur cette adresse",
"EMAIL_INVITATION" => "Invitation à une conférence vidéo",
"YOU_ARE_INVITED_TO_A_MEETING" => "Vous êtes attendu sur un salon de vidéo conférence. " .
"Avant de le rejoindre, assurez vous de disposer de tout le nécessaire",
"A_MODERN_BROWSER" => "Un navigateur web moderne, les versions récentes des navigateurs Mozilla " .
"Firefox, Google Chrome ou Opera fonctionneront",
"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",
"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",

@ -381,7 +381,6 @@ post '/action' => sub {
Subject => encode("MIME-Header", $self->l("EMAIL_INVITATION")),
To => $rcpt
],
content_type => 'multipart/alternative',
data => [
template => 'invite',
room => $room

@ -1,14 +1,23 @@
<html>
<p>
<%
<%
my $url = $self->url_for('/')->to_abs;
$url .= ($url =~ m/\/$/) ? '' : '/';
%>
<%=
$self->l('TO_JOIN_CLICK_THIS_LINK');
%>
<br/>
<p>
%>
<p>
<%=l 'YOU_ARE_INVITED_TO_A_MEETING' %>
<ul>
<li>
<%=l 'A_MODERN_BROWSER' %>
</li>
<li>
<%=l 'A_WEBCAM' %>
</li>
<li>
<%=l 'A_MIC' %>
</li>
</ul>
</p>
<p>
<%=l 'WHEN_YOU_ARE_READY' %>
<center>
<h1>
<a href="<%= $url . $room %>">
@ -16,14 +25,13 @@
</a>
</h1>
</center>
</p>
<br>
<p>
</p>
<br>
<p>
<%=l 'HAVE_A_NICE_MEETING' %>
</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
&mdash;
<br>
<%=l 'EMAIL_SIGN' %>
</p>
</html>
</p>

@ -2,9 +2,13 @@
my $url = $self->url_for('/')->to_abs;
$url .= ($url =~ m/\/$/) ? '' : '/';
%>
<%=
$self->l('TO_JOIN_CLICK_THIS_LINK')
%>
<%=l 'YOU_ARE_INVITED_TO_A_MEETING' %>
* <%=l 'A_MODERN_BROWSER' %>
* <%=l 'A_WEBCAM' %>
* <%=l 'A_MIC' %>
<%=l 'WHEN_YOU_ARE_READY' %>
<%= $url . $room %>

Loading…
Cancel
Save