Pluralize messages on more_follows.js

This commit is contained in:
Alex Gleason 2020-06-06 14:06:45 -05:00
parent 7147cfe662
commit 9323cf1fdf
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -3,21 +3,13 @@ import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
following_singular: {
id: 'morefollows.following_label_singular',
defaultMessage: '…and {count} more follow on a remote site.',
following: {
id: 'morefollows.following_label',
defaultMessage: '…and {count} more {count, plural, one {follow} other {follows}} on remote sites.',
},
following_plural: {
id: 'morefollows.following_label_plural',
defaultMessage: '…and {count} more follows on remote sites.',
},
followers_singular: {
id: 'morefollows.followers_label_singular',
defaultMessage: '…and {count} more follower on a remote site.',
},
followers_plural: {
id: 'morefollows.followers_label_plural',
defaultMessage: '…and {count} more followers on remote sites.',
followers: {
id: 'morefollows.followers_label',
defaultMessage: '…and {count} more {count, plural, one {follower} other {followers}} on remote sites.',
},
});
@ -38,8 +30,7 @@ class MoreFollows extends React.PureComponent {
getMessage = () => {
const { type, count, intl } = this.props;
const messageKey = `${type}_${count > 1 ? 'plural' : 'singular'}`;
return intl.formatMessage(messages[messageKey], { count });
return intl.formatMessage(messages[type], { count });
}
render() {