Commit 6a87caad authored by JC Brand's avatar JC Brand

Don't use template literals for translated strings

parent adbee2af
...@@ -640,7 +640,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -640,7 +640,7 @@ converse.plugins.add('converse-muc-views', {
} else if (current_affiliation === 'outcast') { } else if (current_affiliation === 'outcast') {
this.showChatEvent(__("%1$s has been banned from this groupchat", occupant.get('nick'))) this.showChatEvent(__("%1$s has been banned from this groupchat", occupant.get('nick')))
} else if (current_affiliation === 'admin' || current_affiliation == 'owner') { } else if (current_affiliation === 'admin' || current_affiliation == 'owner') {
this.showChatEvent(__(`%1$s is now an ${current_affiliation} of this groupchat`, occupant.get('nick'))) this.showChatEvent(__('%1$s is now an %2$s of this groupchat', occupant.get('nick'), current_affiliation))
} }
}, },
...@@ -820,7 +820,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -820,7 +820,7 @@ converse.plugins.add('converse-muc-views', {
verifyRoles (roles) { verifyRoles (roles) {
const me = this.model.occupants.findWhere({'jid': _converse.bare_jid}); const me = this.model.occupants.findWhere({'jid': _converse.bare_jid});
if (!_.includes(roles, me.get('role'))) { if (!_.includes(roles, me.get('role'))) {
this.showErrorMessage(__(`Forbidden: you do not have the necessary role in order to do that.`)) this.showErrorMessage(__('Forbidden: you do not have the necessary role in order to do that.'))
return false; return false;
} }
return true; return true;
...@@ -829,7 +829,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -829,7 +829,7 @@ converse.plugins.add('converse-muc-views', {
verifyAffiliations (affiliations) { verifyAffiliations (affiliations) {
const me = this.model.occupants.findWhere({'jid': _converse.bare_jid}); const me = this.model.occupants.findWhere({'jid': _converse.bare_jid});
if (!_.includes(affiliations, me.get('affiliation'))) { if (!_.includes(affiliations, me.get('affiliation'))) {
this.showErrorMessage(__(`Forbidden: you do not have the necessary affiliation in order to do that.`)) this.showErrorMessage(__('Forbidden: you do not have the necessary affiliation in order to do that.'))
return false; return false;
} }
return true; return true;
...@@ -986,7 +986,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -986,7 +986,7 @@ converse.plugins.add('converse-muc-views', {
break; break;
case 'register': case 'register':
if (args.length > 1) { if (args.length > 1) {
this.showErrorMessage(__(`Error: invalid number of arguments`)) this.showErrorMessage(__('Error: invalid number of arguments'))
} else { } else {
this.model.registerNickname().then(err_msg => { this.model.registerNickname().then(err_msg => {
if (err_msg) this.showErrorMessage(err_msg) if (err_msg) this.showErrorMessage(err_msg)
......
...@@ -1308,9 +1308,9 @@ converse.plugins.add('converse-muc', { ...@@ -1308,9 +1308,9 @@ converse.plugins.add('converse-muc', {
}).catch(iq => { }).catch(iq => {
if (sizzle('item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', iq).length) { if (sizzle('item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', iq).length) {
this.feedback.set('error', __(`Error: the groupchat ${this.model.getDisplayName()} does not exist.`)); this.feedback.set('error', __('Error: the groupchat %1$s does not exist.', this.model.getDisplayName()));
} else if (sizzle('not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) { } else if (sizzle('not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
this.feedback.set('error', __(`Sorry, you're not allowed to register in this groupchat`)); this.feedback.set('error', __("Sorry, you're not allowed to register in this groupchat"));
} }
}); });
} }
......
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