From a3afa04c69186d505061bd9b5e5f2e845ec098c5 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 10 Jun 2026 15:19:34 +0800 Subject: [PATCH] feat(i18n): add translation for "All" in GroupSwitch component for English, Simplified Chinese, and Traditional Chinese --- src/components/GroupSwitch.tsx | 6 +++++- src/locales/en/translation.json | 3 +++ src/locales/zh-CN/translation.json | 3 +++ src/locales/zh-TW/translation.json | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/GroupSwitch.tsx b/src/components/GroupSwitch.tsx index f898308..3f6e4a4 100644 --- a/src/components/GroupSwitch.tsx +++ b/src/components/GroupSwitch.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef } from "react"; +import { useTranslation } from "react-i18next"; import { useActiveIndicator } from "@/hooks/use-active-indicator"; import { cn } from "@/lib/utils"; @@ -11,6 +12,7 @@ export default function GroupSwitch({ currentTab: string; setCurrentTab: (tab: string) => void; }) { + const { t } = useTranslation(); const customBackgroundImage = (window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage @@ -117,7 +119,9 @@ export default function GroupSwitch({ )} >
{tab}
++ {tab === "All" ? t("group.all", { defaultValue: "All" }) : tab} +