Use "hidden message" instead of spoiler

This commit is contained in:
JC Brand 2018-02-07 14:35:53 +01:00
parent f267ee5ae0
commit 4732f315ed
2 changed files with 9 additions and 9 deletions

View File

@ -137,10 +137,10 @@
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeTruthy();
spoiler_toggle = view.el.querySelector('.toggle-spoiler');
expect(spoiler_toggle.textContent).toBe('Show spoiler');
expect(spoiler_toggle.textContent).toBe('Show hidden message');
spoiler_toggle.click();
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeFalsy();
expect(spoiler_toggle.textContent).toBe('Hide spoiler');
expect(spoiler_toggle.textContent).toBe('Hide hidden message');
spoiler_toggle.click();
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeTruthy();
done();
@ -203,10 +203,10 @@
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeTruthy();
spoiler_toggle = view.el.querySelector('.toggle-spoiler');
expect(spoiler_toggle.textContent).toBe('Show spoiler');
expect(spoiler_toggle.textContent).toBe('Show hidden message');
spoiler_toggle.click();
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeFalsy();
expect(spoiler_toggle.textContent).toBe('Hide spoiler');
expect(spoiler_toggle.textContent).toBe('Hide hidden message');
spoiler_toggle.click();
expect(_.includes(spoiler_msg_el.classList, 'collapsed')).toBeTruthy();
done();

View File

@ -330,7 +330,7 @@
renderMessageForm () {
let placeholder;
if (this.model.get('composing_spoiler')) {
placeholder = __('Spoiler message');
placeholder = __('Hidden message');
} else {
placeholder = __('Personal message');
}
@ -570,7 +570,7 @@
* (Object) attrs: An object containing message attributes.
*/
if (attrs.is_spoiler) {
return {'label_show': __('Show spoiler')};
return {'label_show': __('Show hidden message')};
} else {
return {}
}
@ -829,7 +829,7 @@
* Parameters:
* (String) text - The chat message text.
* (String) spoiler_hint - A hint in case the message
* text is a spoiler message. See XEP-0382
* text is a hidden/spoiler message. See XEP-0382
*/
if (!_converse.connection.authenticated) {
return this.showHelpMessages(
@ -1028,12 +1028,12 @@
toggle_el.parentElement.querySelector('.spoiler')
);
if (toggle_el.getAttribute("data-toggle-state") == "closed") {
toggle_el.textContent = __('Hide spoiler');
toggle_el.textContent = __('Hide hidden message');
toggle_el.classList.remove("icon-eye");
toggle_el.classList.add("icon-eye-blocked");
toggle_el.setAttribute("data-toggle-state", "open");
} else {
toggle_el.textContent = __('Show spoiler');
toggle_el.textContent = __('Show hidden message');
toggle_el.classList.remove("icon-eye-blocked");
toggle_el.classList.add("icon-eye");
toggle_el.setAttribute("data-toggle-state", "closed");