Commit bb5dff9a authored by JC Brand's avatar JC Brand

Merge branch 'better-chat_status' of https://github.com/linkmauve/converse.js...

Merge branch 'better-chat_status' of https://github.com/linkmauve/converse.js into linkmauve-better-chat_status
parents 6717315d d518596a
......@@ -1688,7 +1688,7 @@
var media = view.el.querySelector('.chat-msg .chat-msg-media');
expect(media.innerHTML.replace(/(\r\n|\n|\r)/gm, "")).toEqual(
'<!-- src/templates/file.html -->'+
'<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download: "funny.pdf</a>');
'<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download "funny.pdf"</a>');
done();
});
}));
......
......@@ -217,9 +217,11 @@
}, false);
xhr.onerror = () => {
let message = __('Sorry, could not succesfully upload your file.');
let message;
if (xhr.responseText) {
message += ' ' + __('Your server\'s response: "%1$s"', xhr.responseText)
message = __('Sorry, could not succesfully upload your file. Your server’s response: "%1$s"', xhr.responseText)
} else {
message = __('Sorry, could not succesfully upload your file.');
}
this.save({
'type': 'error',
......
......@@ -1071,13 +1071,13 @@
let text;
if (u.isVisible(this.el)) {
if (show === 'offline') {
text = fullname+' '+__('has gone offline');
text = __('%1$s has gone offline', fullname);
} else if (show === 'away') {
text = fullname+' '+__('has gone away');
text = __('%1$s has gone away', fullname);
} else if ((show === 'dnd')) {
text = fullname+' '+__('is busy');
text = __('%1$s is busy', fullname);
} else if (show === 'online') {
text = fullname+' '+__('is online');
text = __('%1$s is online', fullname);
}
if (text) {
this.content.insertAdjacentHTML(
......
......@@ -208,16 +208,16 @@
if (this.model.get('sender') === 'me') {
text = __('Typing from another device');
} else {
text = name +' '+__('is typing');
text = __('%1$s is typing', name);
}
} else if (this.model.get('chat_state') === _converse.PAUSED) {
if (this.model.get('sender') === 'me') {
text = __('Stopped typing on the other device');
} else {
text = name +' '+__('has stopped typing');
text = __('%1$s has stopped typing', name);
}
} else if (this.model.get('chat_state') === _converse.GONE) {
text = name +' '+__('has gone away');
text = __('%1$s has gone away', name);
} else {
return;
}
......
......@@ -267,7 +267,7 @@
}
return tpl_file({
'url': url,
'label_download': __('Download: "%1$s', filename)
'label_download': __('Download "%1$s"', filename)
})
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment