From 4732f315ed42a40182eb9f2f93ee2b43f3ec55ef Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 7 Feb 2018 14:35:53 +0100 Subject: [PATCH] Use "hidden message" instead of spoiler --- spec/spoilers.js | 8 ++++---- src/converse-chatview.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/spoilers.js b/spec/spoilers.js index c396510e5..cdd1e25ce 100644 --- a/spec/spoilers.js +++ b/spec/spoilers.js @@ -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(); diff --git a/src/converse-chatview.js b/src/converse-chatview.js index b504f5cf7..133c2b877 100644 --- a/src/converse-chatview.js +++ b/src/converse-chatview.js @@ -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");