chore(i18n): navigation.*

This commit is contained in:
Slinetrac
2025-11-02 21:05:58 +08:00
Unverified
parent d70bb23e1a
commit e6df315bb0
17 changed files with 598 additions and 366 deletions

View File

@@ -823,7 +823,7 @@ export const CurrentProxyCard = () => {
return (
<EnhancedCard
title={t("Current Node")}
title={t("components.home.currentProxy.title")}
icon={
<Tooltip
title={
@@ -840,7 +840,9 @@ export const CurrentProxyCard = () => {
iconColor={currentProxy ? "primary" : undefined}
action={
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<Tooltip title={t("Delay check")}>
<Tooltip
title={t("components.home.currentProxy.actions.refreshDelay")}
>
<span>
<IconButton
size="small"
@@ -868,7 +870,7 @@ export const CurrentProxyCard = () => {
sx={{ borderRadius: 1.5 }}
endIcon={<ChevronRight fontSize="small" />}
>
{t("Label-Proxies")}
{t("navigation.tabs.proxies")}
</Button>
</Box>
}
@@ -906,7 +908,7 @@ export const CurrentProxyCard = () => {
{isGlobalMode && (
<Chip
size="small"
label={t("Global Mode")}
label={t("components.home.currentProxy.labels.globalMode")}
color="primary"
sx={{ mr: 0.5 }}
/>
@@ -914,7 +916,7 @@ export const CurrentProxyCard = () => {
{isDirectMode && (
<Chip
size="small"
label={t("Direct Mode")}
label={t("components.home.currentProxy.labels.directMode")}
color="success"
sx={{ mr: 0.5 }}
/>
@@ -954,12 +956,14 @@ export const CurrentProxyCard = () => {
size="small"
sx={{ mb: 1.5 }}
>
<InputLabel id="proxy-group-select-label">{t("Group")}</InputLabel>
<InputLabel id="proxy-group-select-label">
{t("components.home.currentProxy.labels.group")}
</InputLabel>
<Select
labelId="proxy-group-select-label"
value={state.selection.group}
onChange={handleGroupChange}
label={t("Group")}
label={t("components.home.currentProxy.labels.group")}
disabled={isGlobalMode || isDirectMode}
>
{state.proxyData.groups.map((group) => (
@@ -972,12 +976,14 @@ export const CurrentProxyCard = () => {
{/* 代理节点选择器 */}
<FormControl fullWidth variant="outlined" size="small" sx={{ mb: 0 }}>
<InputLabel id="proxy-select-label">{t("Proxy")}</InputLabel>
<InputLabel id="proxy-select-label">
{t("components.home.currentProxy.labels.proxy")}
</InputLabel>
<Select
labelId="proxy-select-label"
value={state.selection.proxy}
onChange={handleProxyChange}
label={t("Proxy")}
label={t("components.home.currentProxy.labels.proxy")}
disabled={isDirectMode}
renderValue={renderProxyValue}
MenuProps={{
@@ -1033,7 +1039,7 @@ export const CurrentProxyCard = () => {
) : (
<Box sx={{ textAlign: "center", py: 4 }}>
<Typography variant="body1" color="text.secondary">
{t("No active proxy node")}
{t("components.home.currentProxy.labels.noActiveNode")}
</Typography>
</Box>
)}

View File

@@ -111,7 +111,9 @@ const ProfileDetails = ({
noWrap
sx={{ display: "flex", alignItems: "center" }}
>
<span style={{ flexShrink: 0 }}>{t("From")}: </span>
<span style={{ flexShrink: 0 }}>
{t("components.home.profile.labels.from")}:{" "}
</span>
{current.home ? (
<Link
component="button"
@@ -186,7 +188,7 @@ const ProfileDetails = ({
sx={{ cursor: "pointer" }}
onClick={onUpdateProfile}
>
{t("Update Time")}:{" "}
{t("components.home.profile.labels.updateTime")}:{" "}
<Box component="span" fontWeight="medium">
{dayjs(current.updated * 1000).format("YYYY-MM-DD HH:mm")}
</Box>
@@ -199,7 +201,7 @@ const ProfileDetails = ({
<Stack direction="row" alignItems="center" spacing={1}>
<SpeedOutlined fontSize="small" color="action" />
<Typography variant="body2" color="text.secondary">
{t("Used / Total")}:{" "}
{t("components.home.profile.labels.usedTotal")}:{" "}
<Box component="span" fontWeight="medium">
{parseTraffic(usedTraffic)} /{" "}
{parseTraffic(current.extra.total)}
@@ -211,7 +213,7 @@ const ProfileDetails = ({
<Stack direction="row" alignItems="center" spacing={1}>
<EventOutlined fontSize="small" color="action" />
<Typography variant="body2" color="text.secondary">
{t("Expire Time")}:{" "}
{t("components.home.profile.labels.expireTime")}:{" "}
<Box component="span" fontWeight="medium">
{parseExpire(current.extra.expire)}
</Box>
@@ -266,10 +268,11 @@ const EmptyProfile = ({ onClick }: { onClick: () => void }) => {
sx={{ fontSize: 60, color: "primary.main", mb: 2 }}
/>
<Typography variant="h6" gutterBottom>
{t("Import")} {t("Profiles")}
{t("components.home.profile.actions.import")}{" "}
{t("components.home.profile.title")}
</Typography>
<Typography variant="body2" color="text.secondary">
{t("Click to import subscription")}
{t("components.home.profile.labels.clickToImport")}
</Typography>
</Box>
);
@@ -310,7 +313,7 @@ export const HomeProfileCard = ({
// 卡片标题
const cardTitle = useMemo(() => {
if (!current) return t("Profiles");
if (!current) return t("components.home.profile.title");
if (!current.home) return current.name;
@@ -363,7 +366,7 @@ export const HomeProfileCard = ({
endIcon={<StorageOutlined fontSize="small" />}
sx={{ borderRadius: 1.5 }}
>
{t("Label-Profiles")}
{t("navigation.tabs.proxies")}
</Button>
);
}, [current, goToProfiles, t]);