From da92a8e7c2cfa87c7cf83edbe91bd3f29e7dfe6d Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Tue, 29 Aug 2017 08:47:23 -0300 Subject: [PATCH] Plural and singular translations --- client/talk-plugin-history/Comment.js | 9 +++++++-- locales/en.yml | 2 ++ locales/es.yml | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/talk-plugin-history/Comment.js b/client/talk-plugin-history/Comment.js index c9851b43c..2ddd45816 100644 --- a/client/talk-plugin-history/Comment.js +++ b/client/talk-plugin-history/Comment.js @@ -13,6 +13,7 @@ class Comment extends React.Component { render() { const {comment, link, data, root} = this.props; + const reactionCount = getTotalReactionsCount(comment.action_summaries); return (
@@ -26,10 +27,14 @@ class Comment extends React.Component { />
- {getTotalReactionsCount(comment.action_summaries)} {t('common.reactions')} + + {reactionCount} + {reactionCount === 1 ? t('common.reaction') : t('common.reactions')} - {comment.replyCount} {t('common.replies')} + + {comment.replyCount} + {comment.replyCount === 1 ? t('common.reply') : t('common.replies')}
diff --git a/locales/en.yml b/locales/en.yml index da7bd54d1..791bc1121 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -41,7 +41,9 @@ en: common: copy: 'Copy' error: 'An error has occurred.' + reply: 'reply' replies: 'replies' + reaction: 'reaction' reactions: 'reactions' story: 'Story' community: diff --git a/locales/es.yml b/locales/es.yml index 8c3683021..99f55d32b 100644 --- a/locales/es.yml +++ b/locales/es.yml @@ -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: