mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
640b65eb6c
@ -33,11 +33,28 @@ var Receipt = require('../../../utils/Receipt');
|
|||||||
|
|
||||||
const HIDE_CONFERENCE_CHANS = true;
|
const HIDE_CONFERENCE_CHANS = true;
|
||||||
|
|
||||||
const VERBS = {
|
function phraseForSection(section) {
|
||||||
'm.favourite': 'favourite',
|
// These would probably be better as individual strings,
|
||||||
'im.vector.fake.direct': 'tag direct chat',
|
// but for some reason we have translations for these strings
|
||||||
'im.vector.fake.recent': 'restore',
|
// as-is, so keeping it like this for now.
|
||||||
'm.lowpriority': 'demote',
|
let verb;
|
||||||
|
switch (section) {
|
||||||
|
case 'm.favourite':
|
||||||
|
verb = _t('to favourite');
|
||||||
|
break;
|
||||||
|
case 'im.vector.fake.direct':
|
||||||
|
verb = _t('to tag direct chat');
|
||||||
|
break;
|
||||||
|
case 'im.vector.fake.recent':
|
||||||
|
verb = _t('to restore');
|
||||||
|
break;
|
||||||
|
case 'm.lowpriority':
|
||||||
|
verb = _t('to demote');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
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({
|
||||||
@ -505,7 +522,7 @@ module.exports = React.createClass({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelText = 'Drop here to ' + (VERBS[section] || 'tag ' + section);
|
const labelText = phraseForSection(section);
|
||||||
|
|
||||||
return <RoomDropTarget label={labelText} />;
|
return <RoomDropTarget label={labelText} />;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user