chore: missing locale

This commit is contained in:
dongchengjie
2024-06-09 11:16:13 +08:00
parent 444643eb6f
commit 46dc40149e
11 changed files with 85 additions and 36 deletions

View File

@@ -13,6 +13,7 @@ import {
EditRounded,
OpenInNewRounded,
} from "@mui/icons-material";
import { useTranslation } from "react-i18next";
interface Props {
value?: string;
@@ -35,6 +36,7 @@ export const WebUIItem = (props: Props) => {
const [editing, setEditing] = useState(false);
const [editValue, setEditValue] = useState(value);
const { t } = useTranslation();
if (editing || onlyEdit) {
return (
@@ -45,12 +47,12 @@ export const WebUIItem = (props: Props) => {
size="small"
value={editValue}
onChange={(e) => setEditValue(e.target.value)}
placeholder={`Support %host %port %secret`}
placeholder={t("Support %host, %port, %secret")}
autoComplete="off"
/>
<IconButton
size="small"
title="Save"
title={t("Save")}
color="inherit"
onClick={() => {
onChange(editValue);
@@ -61,7 +63,7 @@ export const WebUIItem = (props: Props) => {
</IconButton>
<IconButton
size="small"
title="Cancel"
title={t("Cancel")}
color="inherit"
onClick={() => {
onCancel?.();
@@ -100,7 +102,7 @@ export const WebUIItem = (props: Props) => {
/>
<IconButton
size="small"
title="Open URL"
title={t("Open URL")}
color="inherit"
onClick={() => onOpenUrl?.(value)}
>
@@ -108,7 +110,7 @@ export const WebUIItem = (props: Props) => {
</IconButton>
<IconButton
size="small"
title="Edit"
title={t("Edit")}
color="inherit"
onClick={() => {
setEditing(true);
@@ -119,7 +121,7 @@ export const WebUIItem = (props: Props) => {
</IconButton>
<IconButton
size="small"
title="Delete"
title={t("Delete")}
color="inherit"
onClick={onDelete}
>