2016-05-13 12:44:03 +02:00
|
|
|
add_dependencies({
|
|
|
|
Handlebars: 'handlebars',
|
|
|
|
templates: 'js/templates',
|
2016-12-03 23:17:57 +01:00
|
|
|
i18n: 'i18next',
|
2016-05-13 12:44:03 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
var i18n = global.i18n;
|
|
|
|
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",
|
2017-07-12 22:22:07 +02:00
|
|
|
"Notifications are triggered when a message arrives and Zulip isn't in focus or the message is offscreen.": "Some French text with Zulip",
|
2016-12-03 23:17:57 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2016-05-13 12:44:03 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
(function test_t_tag() {
|
|
|
|
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
|
|
|
},
|
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);
|
2016-05-13 12:44:03 +02:00
|
|
|
}());
|
|
|
|
|
|
|
|
(function test_tr_tag() {
|
|
|
|
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,
|
2017-04-29 06:56:58 +02:00
|
|
|
enable_stream_sounds: 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,
|
|
|
|
autoscroll_forever: false,
|
2016-12-03 23:17:57 +01:00
|
|
|
default_desktop_notifications: false,
|
|
|
|
},
|
2016-05-13 12:44:03 +02:00
|
|
|
};
|
|
|
|
|
2016-11-04 16:34:27 +01:00
|
|
|
var html = global.render_template('settings_tab', args);
|
2017-04-04 15:44:45 +02:00
|
|
|
assert(html.indexOf('Some French text with Zulip') > 0);
|
2016-05-13 12:44:03 +02:00
|
|
|
}());
|