summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-03-02 12:08:55 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-03 08:47:52 -0500
commit366bc4fd575cca2d5b1a48a6f05008d1fdcd4b87 (patch)
treeea0d53602d154a54e0ee13c33c1f84de1e1fd5da /web/react
parenta92b51935e172f4e4fc7af83f410a071d0590f90 (diff)
downloadchat-366bc4fd575cca2d5b1a48a6f05008d1fdcd4b87.tar.gz
chat-366bc4fd575cca2d5b1a48a6f05008d1fdcd4b87.tar.bz2
chat-366bc4fd575cca2d5b1a48a6f05008d1fdcd4b87.zip
Fixed '0 of X users' in FilteredUserList and cleaned up pluralization of 'member'
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/filtered_user_list.jsx19
1 files changed, 9 insertions, 10 deletions
diff --git a/web/react/components/filtered_user_list.jsx b/web/react/components/filtered_user_list.jsx
index 67e75af47..7099f99af 100644
--- a/web/react/components/filtered_user_list.jsx
+++ b/web/react/components/filtered_user_list.jsx
@@ -55,20 +55,17 @@ class FilteredUserList extends React.Component {
});
}
- let memberString = formatMessage(holders.member);
- if (users.length !== 1) {
- memberString += 's';
- }
-
let count;
if (users.length === this.props.users.length) {
count = (
<FormattedMessage
id='filtered_user_list.count'
- defaultMessage='{count} {member}'
+ defaultMessage='{count} {count, plural,
+ one {member}
+ other {members}
+ }'
values={{
- count: users.length,
- member: memberString
+ count: users.length
}}
/>
);
@@ -76,10 +73,12 @@ class FilteredUserList extends React.Component {
count = (
<FormattedMessage
id='filtered_user_list.countTotal'
- defaultMessage='{count} {member} of {total} Total'
+ defaultMessage='{count} {count, plural,
+ one {member}
+ other {members}
+ } of {total} Total'
values={{
count: users.length,
- member: memberString,
total: this.props.users.length
}}
/>