Skip to content

Commit fb47f19

Browse files
committed
Improve translation
1 parent 61e00e8 commit fb47f19

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import React from 'react'
22
import { useAppTranslation } from '@/i18n/useAppTranslation'
3-
import pluralize from 'pluralize'
43

54
export const Count = ({ number }: { number: number }): JSX.Element => {
65
const { t } = useAppTranslation('components/community-solutions')
76
return (
87
<h2 className="text-h4 mb-24">
9-
{t('commentsList.count.numberOfComments', {
10-
number: number,
11-
pluralize: pluralize('comment', number),
12-
})}
8+
{t('commentsList.comment', { count: number })}
139
</h2>
1410
)
1511
}

app/javascript/i18n/en/components-community-solutions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ export default {
33
'commentsList.reminder.rememberComments':
44
'Remember! Comments are for asking questions or applauding a solution. <0>Do not use them</0> for mentoring or giving feedback.',
55
'commentsList.commentView.edit': 'Edit',
6-
'commentsList.count.numberOfComments': '{{number}} {{pluralize}}',
6+
'commentsList.comment_one': '{{count}} comment',
7+
'commentsList.comment_other': '{{count}} comments',
78
'commentsList.emptyList.noComments': 'No one has commented on this solution.',
89
'commentsList.emptyList.beFirst': 'Be the first to add your comment!',
910
'commentsList.options.disableComments': 'Disable comments…',

0 commit comments

Comments
 (0)