Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor: Update badge labels to use multiplication symbol instead of 'x'

robinafaf11ffb64a
diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml
index 2b0a4714..f7c16e64 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -1748,8 +1748,8 @@ ui:
confirm: View badges
title: Badges
awarded: Awarded
- earned_x: Earned x{{ number }}
- x_awarded: "{{ number }} awarded"
+ earned_×: Earned ×{{ number }}
+ ×_awarded: "{{ number }} awarded"
can_earn_multiple: You can earn this multiple times.
earned: Earned
diff --git a/ui/src/components/CardBadge/index.tsx b/ui/src/components/CardBadge/index.tsx
index dd8c18e6..fcb1bb9d 100644
--- a/ui/src/components/CardBadge/index.tsx
+++ b/ui/src/components/CardBadge/index.tsx
@@ -57,7 +57,7 @@ const Index: FC<IProps> = ({
{badgePillType === 'count' && Number(data?.earned_count) > 0 && (
<Badge pill bg="success" className="label">
- x{data.earned_count}
+ ×{data.earned_count}
</Badge>
)}
{data.icon.startsWith('http') ? (
@@ -78,7 +78,7 @@ const Index: FC<IProps> = ({
<h6 className="mb-0 mt-3 text-center">{data.name}</h6>
{showAwardedCount && (
<div className="small text-secondary">
- {t('x_awarded', { number: formatCount(data.award_count) })}
+ {t('×_awarded', { number: formatCount(data.award_count) })}
</div>
)}
</Card.Body>
diff --git a/ui/src/pages/Badges/Detail/components/Badge/index.tsx b/ui/src/pages/Badges/Detail/components/Badge/index.tsx
index affb73e6..29da1af6 100644
--- a/ui/src/pages/Badges/Detail/components/Badge/index.tsx
+++ b/ui/src/pages/Badges/Detail/components/Badge/index.tsx
@@ -73,13 +73,13 @@ const Index: FC<IProps> = ({ data }) => {
<div className="small mt-2">
{data.award_count > 0 && (
<span className="text-secondary me-2">
- {t('x_awarded', { number: formatCount(data.award_count) })}
+ {t('×_awarded', { number: formatCount(data.award_count) })}
</span>
)}
{data.earned_count > 0 && (
<Badge bg="success">
- {t('earned_x', { number: data.earned_count })}
+ {t('earned_×', { number: data.earned_count })}
</Badge>
)}
</div>