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.

fix: i18n parameter passing optimization

shuai433b8d5d1b80
diff --git a/ui/src/components/TagSelector/index.tsx b/ui/src/components/TagSelector/index.tsx
index 94e95325..c9eb3c97 100644
--- a/ui/src/components/TagSelector/index.tsx
+++ b/ui/src/components/TagSelector/index.tsx
@@ -297,15 +297,16 @@ const TagSelector: FC<IProps> = ({
const handleTagHint = () => {
if (!writeInfo || writeInfo.min_tags === undefined || !writeInfo.min_tags) {
- return t(`hint_zero_tags`);
+ return t('hint_zero_tags');
}
if (writeInfo.min_tags === 1) {
- return t(`hint`);
+ return t('hint');
}
- let str: string = t(`hint_more_than_one_tag`);
- str = str.replace(`{{ min_tags_number }}`, writeInfo.min_tags.toString());
+ const str = t('hint_more_than_one_tag', {
+ min_content_length: writeInfo.min_tags,
+ });
return str;
};