mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-20 18:20:13 +00:00
feat(i18n): add translation for "All" in GroupSwitch component for English, Simplified Chinese, and Traditional Chinese
This commit is contained in:
@@ -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({
|
||||
)}
|
||||
>
|
||||
<div className="relative z-20 flex items-center gap-1">
|
||||
<p className="whitespace-nowrap">{tab}</p>
|
||||
<p className="whitespace-nowrap">
|
||||
{tab === "All" ? t("group.all", { defaultValue: "All" }) : tab}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user