2019-07-12 02:03:55 +02:00
set _global ( 'Handlebars' , global . make _handlebars ( ) ) ;
2017-11-08 17:35:08 +01:00
zrequire ( 'templates' ) ;
zrequire ( 'i18n' , 'i18next' ) ;
2016-05-13 12:44:03 +02:00
i18n . init ( {
nsSeparator : false ,
keySeparator : false ,
interpolation : {
prefix : "__" ,
2016-12-03 23:17:57 +01:00
suffix : "__" ,
2016-05-13 12:44:03 +02:00
} ,
lng : 'fr' ,
resources : {
fr : {
translation : {
2017-04-04 15:44:45 +02:00
"Quote and reply" : "French translation" ,
2019-04-18 03:19:55 +02:00
"Desktop notifications are triggered for messages that are offscreen when they arrive. Mobile and email notifications are triggered once you have been away from Zulip for a few minutes." : "Some French text" ,
2016-12-03 23:17:57 +01:00
} ,
} ,
} ,
2016-05-13 12:44:03 +02:00
} ) ;
2018-05-15 12:40:07 +02:00
run _test ( 't_tag' , ( ) => {
2016-05-13 12:44:03 +02:00
var args = {
2016-12-03 03:08:47 +01:00
message : {
2016-05-13 12:44:03 +02:00
is _stream : true ,
id : "99" ,
stream : "devel" ,
subject : "testing" ,
2016-12-03 23:17:57 +01:00
sender _full _name : "King Lear" ,
2016-05-13 12:44:03 +02:00
} ,
2018-03-28 00:28:57 +02:00
should _display _quote _and _reply : true ,
2016-12-03 03:08:47 +01:00
can _edit _message : true ,
can _mute _topic : true ,
2016-12-03 23:17:57 +01:00
narrowed : true ,
2016-05-13 12:44:03 +02:00
} ;
2017-04-04 15:44:45 +02:00
var html = global . render _template ( 'actions_popover_content' , args ) ;
assert ( html . indexOf ( "French translation" ) > 0 ) ;
2018-05-15 12:40:07 +02:00
} ) ;
2016-05-13 12:44:03 +02:00
2018-05-15 12:40:07 +02:00
run _test ( 'tr_tag' , ( ) => {
2016-05-13 12:44:03 +02:00
var args = {
2016-12-03 03:08:47 +01:00
page _params : {
2017-04-27 00:26:49 +02:00
full _name : "John Doe" ,
2016-12-03 03:08:47 +01:00
password _auth _enabled : false ,
avatar _url : "http://example.com" ,
left _side _userlist : false ,
twenty _four _hour _time : false ,
2017-04-29 07:01:46 +02:00
enable _stream _desktop _notifications : false ,
2017-08-17 16:55:32 +02:00
enable _stream _push _notifications : false ,
2019-06-11 08:47:49 +02:00
enable _stream _audible _notifications : false ,
2017-04-29 08:13:47 +02:00
enable _desktop _notifications : false ,
2017-04-29 06:53:28 +02:00
enable _sounds : false ,
2016-12-03 03:08:47 +01:00
enable _offline _email _notifications : false ,
enable _offline _push _notifications : false ,
enable _online _push _notifications : false ,
enable _digest _emails : false ,
2016-12-03 23:17:57 +01:00
} ,
2016-05-13 12:44:03 +02:00
} ;
2016-11-04 16:34:27 +01:00
var html = global . render _template ( 'settings_tab' , args ) ;
2019-04-18 03:19:55 +02:00
assert ( html . indexOf ( 'Some French text' ) > 0 ) ;
2018-05-15 12:40:07 +02:00
} ) ;