Better translations in RoomList.js

Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
This commit is contained in:
Stefan Parviainen 2017-10-12 21:24:45 +02:00
parent 047daec587
commit 1f44233e05

View File

@ -34,27 +34,18 @@ const Receipt = require('../../../utils/Receipt');
const HIDE_CONFERENCE_CHANS = true; const HIDE_CONFERENCE_CHANS = true;
function phraseForSection(section) { function phraseForSection(section) {
// These would probably be better as individual strings,
// but for some reason we have translations for these strings
// as-is, so keeping it like this for now.
let verb;
switch (section) { switch (section) {
case 'm.favourite': case 'm.favourite':
verb = _t('to favourite'); return _t('Drop here to favourite');
break;
case 'im.vector.fake.direct': case 'im.vector.fake.direct':
verb = _t('to tag direct chat'); return _t('Drop here to tag direct chat');
break;
case 'im.vector.fake.recent': case 'im.vector.fake.recent':
verb = _t('to restore'); return _t('Drop here to restore');
break;
case 'm.lowpriority': case 'm.lowpriority':
verb = _t('to demote'); return _t('Drop here to demote');
break;
default: default:
return _t('Drop here to tag %(section)s', {section: section}); return _t('Drop here to tag %(section)s', {section: section});
} }
return _t('Drop here %(toAction)s', {toAction: verb});
} }
module.exports = React.createClass({ module.exports = React.createClass({