Add translation for 'Other' tag in multiple languages

This commit is contained in:
2025-05-31 11:38:49 +08:00
parent 6f6de32557
commit 37a3d0e459
2 changed files with 6 additions and 1 deletions

View File

@@ -171,6 +171,7 @@ export const i18nData = {
"Please check your network if the verification takes too long or the captcha does not appear.": "Please check your network if the verification takes too long or the captcha does not appear.",
"About": "About",
"Home": "Home",
"Other": "Other",
}
},
"zh-CN": {
@@ -345,6 +346,7 @@ export const i18nData = {
"Please check your network if the verification takes too long or the captcha does not appear.": "如果验证时间过长或验证码未出现, 请检查您的网络连接",
"About": "关于",
"Home": "首页",
"Other": "其他",
}
},
"zh-TW": {
@@ -519,6 +521,7 @@ export const i18nData = {
"Please check your network if the verification takes too long or the captcha does not appear.": "如果驗證時間過長或驗證碼未出現,請檢查您的網絡連接。",
"About": "關於",
"Home": "首頁",
"Other": "其他",
}
}
}

View File

@@ -176,6 +176,8 @@ function Tags({tags}: { tags: Tag[] }) {
const navigate = useNavigate()
const {t} = useTranslation()
for (const tag of tags || []) {
const type = tag.type
if (!tagsMap.has(type)) {
@@ -189,7 +191,7 @@ function Tags({tags}: { tags: Tag[] }) {
Array.from(tagsMap.entries()).map(([type, tags]) => (
<p key={type} className={"px-4"}>
<Badge key={type}>
{type}
{type == "" ? t("Other") : type}
</Badge>
{tags.map(tag => (
<Badge key={tag.name} className={"m-1 cursor-pointer badge-soft badge-primary"} onClick={() => {