@@ -24,6 +24,10 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
24
24
25
25
return [ "$compile" , "safeDisplayName" , "mediaStream" , "safeApply" , "desktopNotify" , "translation" , "playSound" , "fileUpload" , "randomGen" , "buddyData" , "appData" , "$timeout" , "geolocation" , function ( $compile , safeDisplayName , mediaStream , safeApply , desktopNotify , translation , playSound , fileUpload , randomGen , buddyData , appData , $timeout , geolocation ) {
26
26
27
+ // Translation helpers.
28
+ translation . _ ( "Chat with %1$s" ) ;
29
+ translation . _ ( "Room chat %1$s" ) ;
30
+
27
31
var displayName = safeDisplayName ;
28
32
var groupChatId = "" ;
29
33
var maxMessageSize = 200000 ;
@@ -137,7 +141,8 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
137
141
$scope . showGroupRoom ( null , options ) ;
138
142
} else {
139
143
$scope . showRoom ( id , {
140
- title : translation . _ ( "Chat with" )
144
+ // Gets translated in template.
145
+ title : "Chat with %1$s"
141
146
} , options ) ;
142
147
}
143
148
@@ -159,7 +164,8 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
159
164
return ;
160
165
}
161
166
var subscope = $scope . showRoom ( id , {
162
- title : translation . _ ( "Chat with" )
167
+ // Gets translated in template.
168
+ title : "Chat with %1$s"
163
169
} , options ) ;
164
170
subscope . sendChatServer ( id , "Contact request" , {
165
171
ContactRequest : {
@@ -181,7 +187,8 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
181
187
182
188
scope . showGroupRoom = function ( settings , options ) {
183
189
var stngs = $ . extend ( {
184
- title : translation . _ ( "Room chat" ) ,
190
+ // Gets translated in template.
191
+ title : "Room chat %1$s" ,
185
192
group : true
186
193
} , settings ) ;
187
194
return scope . showRoom ( controller . group , stngs , options ) ;
@@ -384,7 +391,7 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
384
391
// before we beep and shout.
385
392
if ( ! subscope . isgroupchat && from !== sessionid ) {
386
393
playSound . play ( "chatmessage" ) ;
387
- desktopNotify . notify ( translation . _ ( "Message from " ) + displayName ( from ) , message ) ;
394
+ desktopNotify . notify ( translation . _ ( "Message from %1$s" , displayName ( from ) ) , message ) ;
388
395
appData . e . triggerHandler ( "uiNotification" , [ "chatmessage" , { from : from , message : message , first : subscope . firstmessage } ] ) ;
389
396
}
390
397
subscope . firstmessage = false ;
0 commit comments