From eca15d3987ca969970bb5f8ebfc642652e08c003 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 2 Jun 2014 12:03:32 +0200 Subject: [PATCH] Add the name in join notifications subject Fix #53 --- lib/Vroom/I18N/en.pm | 3 ++- lib/Vroom/I18N/fr.pm | 3 ++- public/vroom.pl | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 8c552f8..732d652 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -118,7 +118,8 @@ our %Lexicon = ( "NOTIFICATION_ON_JOIN" => "You can set a list of email address which will receive a notification each time someone joins this room", "s_WILL_BE_NOTIFIED" => "%s will receive a notification each time someone joins this room", "s_WONT_BE_NOTIFIED_ANYMORE" => "%s won't be notified anymore", - "JOIN_NOTIFICATION" => "Someone joined the room", + "s_JOINED_ROOM_s" => "%s joined room %s", + "SOMEONE" => "Someone", "SOMEONE_JOINED_A_ROOM" => "Someone joined a video conference room, and your address is configured to receive this notifications", "PARTICIPANT_NAME" => "The one who just joined your room is named", "AUTH_SUCCESS" => "You are now authenticated", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index bd8ba6b..a1d4325 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -127,7 +127,8 @@ our %Lexicon = ( "NOTIFICATION_ON_JOIN" => "Ajouter des adresses email qui recevront une notification dès que quelqu'un rejoint ce salon", "s_WILL_BE_NOTIFIED" => "%s recevra une notification à chaque fois qu'une personne rejoint ce salon", "s_WONT_BE_NOTIFIED_ANYMORE" => "%s ne recevra plus les notifications pour ce salon", - "JOIN_NOTIFICATION" => "Quelqu'un a rejoint votre salon", + "s_JOINED_ROOM_s" => "%s a rejoint le salon %s", + "SOMEONE" => "Quelqu'un", "SOMEONE_JOINED_A_ROOM" => "Quelqu'un a rejoint un salon de vidéo conférence, et votre adresse est configurée " . "pour recevoir ces notifications", "PARTICIPANT_NAME" => "La personne qui a rejoint votre salon se nomme", diff --git a/public/vroom.pl b/public/vroom.pl index 1c4792f..dccb8d5 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -1076,11 +1076,12 @@ post '/action' => sub { # New participant joined the room elsif ($action eq 'join'){ my $name = $self->param('name') || ''; + my $subj = ($name eq '') ? sprintf($self->l('s_JOINED_ROOM_s'), $self->l('SOMEONE'), $room) : sprintf($self->l('s_JOINED_ROOM_s'), $name, $room); # Send notifications foreach my $rcpt ($self->get_notification($room)){ $self->email( header => [ - Subject => encode("MIME-Header", $self->l("JOIN_NOTIFICATION")), + Subject => encode("MIME-Header", $subj), To => $rcpt ], data => [