Plural and singular translations

This commit is contained in:
Belen Curcio
2017-08-29 08:47:23 -03:00
parent e77bdf0b90
commit da92a8e7c2
3 changed files with 11 additions and 2 deletions
+7 -2
View File
@@ -13,6 +13,7 @@ class Comment extends React.Component {
render() {
const {comment, link, data, root} = this.props;
const reactionCount = getTotalReactionsCount(comment.action_summaries);
return (
<div className={styles.myComment}>
@@ -26,10 +27,14 @@ class Comment extends React.Component {
/>
<div className={cn(styles.commentSummary, 'comment_summary')}>
<span className={cn(styles.commentSummaryReactions, 'comment_summary_reactions')}>
<Icon name="thumb_up" /> {getTotalReactionsCount(comment.action_summaries)} {t('common.reactions')}
<Icon name="thumb_up" />
{reactionCount}
{reactionCount === 1 ? t('common.reaction') : t('common.reactions')}
</span>
<span className={cn('comment_summary_replies')}>
<Icon name="reply" /> {comment.replyCount} {t('common.replies')}
<Icon name="reply" />
{comment.replyCount}
{comment.replyCount === 1 ? t('common.reply') : t('common.replies')}
</span>
</div>
<div className="my-comment-asset">
+2
View File
@@ -41,7 +41,9 @@ en:
common:
copy: 'Copy'
error: 'An error has occurred.'
reply: 'reply'
replies: 'replies'
reaction: 'reaction'
reactions: 'reactions'
story: 'Story'
community:
+2
View File
@@ -41,7 +41,9 @@ es:
common:
copy: 'Copiar'
error: 'Ha ocurrido un error.'
reply: 'respuesta'
replies: 'respuestas'
reaction: 'reacción'
reactions: 'reacciones'
story: 'Artículo'
community: