Merge branch 'better-chat_status' of https://github.com/linkmauve/converse.js into linkmauve-better-chat_status
This commit is contained in:
commit
bb5dff9a74
@ -1688,7 +1688,7 @@
|
|||||||
var media = view.el.querySelector('.chat-msg .chat-msg-media');
|
var media = view.el.querySelector('.chat-msg .chat-msg-media');
|
||||||
expect(media.innerHTML.replace(/(\r\n|\n|\r)/gm, "")).toEqual(
|
expect(media.innerHTML.replace(/(\r\n|\n|\r)/gm, "")).toEqual(
|
||||||
'<!-- src/templates/file.html -->'+
|
'<!-- 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();
|
done();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
@ -217,9 +217,11 @@
|
|||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
xhr.onerror = () => {
|
xhr.onerror = () => {
|
||||||
let message = __('Sorry, could not succesfully upload your file.');
|
let message;
|
||||||
if (xhr.responseText) {
|
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({
|
this.save({
|
||||||
'type': 'error',
|
'type': 'error',
|
||||||
|
@ -1071,13 +1071,13 @@
|
|||||||
let text;
|
let text;
|
||||||
if (u.isVisible(this.el)) {
|
if (u.isVisible(this.el)) {
|
||||||
if (show === 'offline') {
|
if (show === 'offline') {
|
||||||
text = fullname+' '+__('has gone offline');
|
text = __('%1$s has gone offline', fullname);
|
||||||
} else if (show === 'away') {
|
} else if (show === 'away') {
|
||||||
text = fullname+' '+__('has gone away');
|
text = __('%1$s has gone away', fullname);
|
||||||
} else if ((show === 'dnd')) {
|
} else if ((show === 'dnd')) {
|
||||||
text = fullname+' '+__('is busy');
|
text = __('%1$s is busy', fullname);
|
||||||
} else if (show === 'online') {
|
} else if (show === 'online') {
|
||||||
text = fullname+' '+__('is online');
|
text = __('%1$s is online', fullname);
|
||||||
}
|
}
|
||||||
if (text) {
|
if (text) {
|
||||||
this.content.insertAdjacentHTML(
|
this.content.insertAdjacentHTML(
|
||||||
|
@ -208,16 +208,16 @@
|
|||||||
if (this.model.get('sender') === 'me') {
|
if (this.model.get('sender') === 'me') {
|
||||||
text = __('Typing from another device');
|
text = __('Typing from another device');
|
||||||
} else {
|
} else {
|
||||||
text = name +' '+__('is typing');
|
text = __('%1$s is typing', name);
|
||||||
}
|
}
|
||||||
} else if (this.model.get('chat_state') === _converse.PAUSED) {
|
} else if (this.model.get('chat_state') === _converse.PAUSED) {
|
||||||
if (this.model.get('sender') === 'me') {
|
if (this.model.get('sender') === 'me') {
|
||||||
text = __('Stopped typing on the other device');
|
text = __('Stopped typing on the other device');
|
||||||
} else {
|
} else {
|
||||||
text = name +' '+__('has stopped typing');
|
text = __('%1$s has stopped typing', name);
|
||||||
}
|
}
|
||||||
} else if (this.model.get('chat_state') === _converse.GONE) {
|
} else if (this.model.get('chat_state') === _converse.GONE) {
|
||||||
text = name +' '+__('has gone away');
|
text = __('%1$s has gone away', name);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@
|
|||||||
}
|
}
|
||||||
return tpl_file({
|
return tpl_file({
|
||||||
'url': url,
|
'url': url,
|
||||||
'label_download': __('Download: "%1$s', filename)
|
'label_download': __('Download "%1$s"', filename)
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user