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 translation for achievements
robin1e8072ba2195
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex 8b137d37..032ad141 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -853,6 +853,9 @@ ui:posts: Postsinvites: Invitesvotes: Votes+ answer: Answer+ question: Question+ badge_award: Badgesuspended:title: Your Account has been Suspendeduntil_time: "Your account was suspended until {{ time }}."diff --git a/ui/src/pages/Users/Notifications/components/Achievements/index.tsx b/ui/src/pages/Users/Notifications/components/Achievements/index.tsxindex c171a427..824bb178 100644--- a/ui/src/pages/Users/Notifications/components/Achievements/index.tsx+++ b/ui/src/pages/Users/Notifications/components/Achievements/index.tsx@@ -19,6 +19,7 @@import { ListGroup } from 'react-bootstrap';import { Link } from 'react-router-dom';+import { useTranslation } from 'react-i18next';import classNames from 'classnames';import isEmpty from 'lodash/isEmpty';@@ -30,6 +31,7 @@ import './index.scss';const Achievements = ({ data, handleReadNotification }) => {const { user } = loggedUserInfoStore();+ const { t } = useTranslation('translation', { keyPrefix: 'notifications' });if (!data) {return null;@@ -87,7 +89,7 @@ const Achievements = ({ data, handleReadNotification }) => {{item.object_info.title}</Link><span className="text-secondary small">- {item.object_info.object_type}+ {t(item.object_info.object_type)}</span></div></ListGroup.Item>