refactor(i18n): align UI actions and status labels with common keys

This commit is contained in:
Slinetrac
2025-11-04 18:48:20 +08:00
Unverified
parent df6c863c71
commit 11a30d8582
23 changed files with 52 additions and 262 deletions

View File

@@ -162,7 +162,7 @@ export const IpInfoCard = () => {
{error}
</Typography>
<Button onClick={fetchIpInfo} sx={{ mt: 2 }}>
{t("home.ipInfo.labels.retry")}
{t("common.actions.retry")}
</Button>
</Box>
</EnhancedCard>

View File

@@ -312,8 +312,8 @@ export const SystemInfoCard = () => {
size="small"
label={
autoLaunchEnabled
? t("home.systemInfo.labels.enabled")
: t("home.systemInfo.labels.disabled")
? t("common.status.enabled")
: t("common.status.disabled")
}
color={autoLaunchEnabled ? "success" : "default"}
variant={autoLaunchEnabled ? "filled" : "outlined"}

View File

@@ -377,7 +377,7 @@ export const ProfileItem = (props: Props) => {
openFile: "profile.menu.openFile",
update: "profile.menu.update",
updateViaProxy: "profile.menu.updateViaProxy",
delete: "profile.menu.delete",
delete: "common.actions.delete",
} as const;
const urlModeMenu: ContextMenuItem[] = [

View File

@@ -220,8 +220,8 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
: t("profile.viewer.title.edit")
}
contentSx={{ width: 375, pb: 0, maxHeight: "80%" }}
okBtn={t("profile.viewer.buttons.save")}
cancelBtn={t("profile.viewer.buttons.cancel")}
okBtn={t("common.actions.save")}
cancelBtn={t("common.actions.cancel")}
onClose={handleClose}
onCancel={handleClose}
onOk={handleOk}

View File

@@ -220,7 +220,7 @@ export const BackupConfigViewer = memo(
type="button"
onClick={handleSubmit(save)}
>
{t("settings.backup.actions.save")}
{t("common.actions.save")}
</Button>
) : (
<>
@@ -239,7 +239,7 @@ export const BackupConfigViewer = memo(
type="button"
size="large"
>
{t("settings.backup.actions.refresh")}
{t("common.actions.refresh")}
</Button>
</>
)}

View File

@@ -161,7 +161,7 @@ export const BackupTableViewer = memo(
)}
<IconButton
color="secondary"
aria-label={t("settings.backup.actions.delete")}
aria-label={t("common.actions.delete")}
size="small"
title={t("settings.backup.actions.deleteBackup")}
onClick={async (e: React.MouseEvent) => {

View File

@@ -68,7 +68,7 @@ export const LocalBackupActions = memo(
type="button"
size="large"
>
{t("settings.backup.actions.refresh")}
{t("common.actions.refresh")}
</Button>
</Stack>
</Grid>