mirror of
https://github.com/element-hq/element-web
synced 2024-10-26 04:35:55 +03:00
Further simplify MemberEventListSummary a bit
Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
This commit is contained in:
parent
6406fc3865
commit
b5024cca75
1 changed files with 2 additions and 4 deletions
|
@ -302,11 +302,9 @@ module.exports = React.createClass({
|
||||||
return "";
|
return "";
|
||||||
} else if (items.length === 1) {
|
} else if (items.length === 1) {
|
||||||
return items[0];
|
return items[0];
|
||||||
} else if (remaining) {
|
} else if (remaining >= 0) {
|
||||||
items = items.slice(0, itemLimit);
|
items = items.slice(0, itemLimit);
|
||||||
return (remaining > 1)
|
return _t("%(items)s and %(count)s others", { items: items.join(', '), count: remaining } )
|
||||||
? _t("%(items)s and %(remaining)s others", { items: items.join(', '), remaining: remaining } )
|
|
||||||
: _t("%(items)s and one other", { items: items.join(', ') });
|
|
||||||
} else {
|
} else {
|
||||||
const lastItem = items.pop();
|
const lastItem = items.pop();
|
||||||
return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem });
|
return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem });
|
||||||
|
|
Loading…
Reference in a new issue