mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-19 09:40:14 +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 { useEffect, useRef } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import { useActiveIndicator } from "@/hooks/use-active-indicator";
|
import { useActiveIndicator } from "@/hooks/use-active-indicator";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ export default function GroupSwitch({
|
|||||||
currentTab: string;
|
currentTab: string;
|
||||||
setCurrentTab: (tab: string) => void;
|
setCurrentTab: (tab: string) => void;
|
||||||
}) {
|
}) {
|
||||||
|
const { t } = useTranslation();
|
||||||
const customBackgroundImage =
|
const customBackgroundImage =
|
||||||
(window.CustomBackgroundImage as string) !== ""
|
(window.CustomBackgroundImage as string) !== ""
|
||||||
? window.CustomBackgroundImage
|
? window.CustomBackgroundImage
|
||||||
@@ -117,7 +119,9 @@ export default function GroupSwitch({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="relative z-20 flex items-center gap-1">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -160,5 +160,8 @@
|
|||||||
"up_total": "Up Total",
|
"up_total": "Up Total",
|
||||||
"down_total": "Down Total"
|
"down_total": "Down Total"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"all": "All"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,5 +161,8 @@
|
|||||||
"up_total": "上传总量",
|
"up_total": "上传总量",
|
||||||
"down_total": "下载总量"
|
"down_total": "下载总量"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"all": "全部"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,5 +156,8 @@
|
|||||||
"up_total": "上傳總量",
|
"up_total": "上傳總量",
|
||||||
"down_total": "下載總量"
|
"down_total": "下載總量"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"all": "全部"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user