From 28b897e2b938a55005f5ade700bd7c6006c3bfef Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 19 Apr 2014 19:23:27 +0200 Subject: [PATCH] Translate missing string "one of the peers" was hardcoded instead of being localized --- lib/Vroom/I18N/en.pm | 1 + lib/Vroom/I18N/fr.pm | 1 + public/js/vroom.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 74f3de7..b0608e5 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -19,6 +19,7 @@ our %Lexicon = ( "EMAIL_SIGN" => "VROOM! And video conferencing becomes free, simple and safe", "ROOM_LOCKED" => "This room is now locked", "ROOM_UNLOCKED" => "This room is now unlocked", + "ONE_OF_THE_PEERS" => "one of the peers", "ROOM_LOCKED_BY_s" => "%s locked the room", "ROOM_UNLOCKED_BY_s" => "%s unlocked the room", "OOOPS" => "Ooops", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 7ec1be1..ccb89e9 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -21,6 +21,7 @@ our %Lexicon = ( "INVITE_SENT_TO_s" => "Une invitation a été envoyée à %s", "ROOM_LOCKED" => "Ce salon est maintenant verrouillé", "ROOM_UNLOCKED" => "Ce salon est maintenant déverrouillé", + "ONE_OF_THE_PEERS" => "un des participants", "ROOM_LOCKED_BY_s" => "%s a verrouillé le salon", "ROOM_UNLOCKED_BY_s" => "%s a déverrouillé le salon", "OOOPS" => "Oups", diff --git a/public/js/vroom.js b/public/js/vroom.js index 7e793ef..114e299 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -22,6 +22,7 @@ var locale = { CAM_SUSPENDED: '', CAM_RESUMED: '', SET_YOUR_NAME_TO_CHAT: '', + ONE_OF_THE_PEERS: '', ROOM_LOCKED_BY_s: '', ROOM_UNLOCKED_BY_s: '', CANT_SEND_TO_s: '', @@ -367,7 +368,7 @@ function initVroom(room) { // Error sending something through dataChannel webrtc.on('cantsend', function (peer, message){ if (message.type == 'textChat') { - var who = (peers[peer.id].hasName) ? peers[peer.id].displayName : 'one of the peers'; + var who = (peers[peer.id].hasName) ? peers[peer.id].displayName : locale.ONE_OF_THE_PEERS; $.notify(sprintf(locale.CANT_SEND_TO_s, who), 'error'); } });