mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-27 02:03:44 -05:00
fix(ui,i18n): move plural check to i18next (#58560)
This commit is contained in:
@@ -366,8 +366,8 @@
|
||||
"joined": "Joined {{date}}",
|
||||
"from": "From {{location}}",
|
||||
"total-points": "Total Points:",
|
||||
"points-singular": "{{count}} point on {{date}}",
|
||||
"points-plural": "{{count}} points on {{date}}",
|
||||
"points_one": "{{count}} point on {{date}}",
|
||||
"points_other": "{{count}} points on {{date}}",
|
||||
"page-number": "{{pageNumber}} of {{totalPages}}",
|
||||
"edit-my-profile": "Edit My Profile",
|
||||
"add-bluesky": "Share this certification on BlueSky",
|
||||
|
||||
@@ -128,17 +128,8 @@ class HeatMapInner extends Component<HeatMapInnerProps, HeatMapInnerState> {
|
||||
if (!value || value.count < 0) {
|
||||
return { 'data-tip': '' };
|
||||
}
|
||||
// Use singular translation if count == 1 else plural
|
||||
if (value.count === 1) {
|
||||
return {
|
||||
'data-tip': t('profile.points-singular', {
|
||||
count: value.count,
|
||||
date: dateFormatted
|
||||
})
|
||||
};
|
||||
}
|
||||
return {
|
||||
'data-tip': t('profile.points-plural', {
|
||||
'data-tip': t('profile.points', {
|
||||
count: value.count,
|
||||
date: dateFormatted
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user