chore: update i18n for shortcut filter (#270)

* chore: resources i18n

* chore: shortcut-list i18n

* chore: resources i18n

* chore: resources i18n

* chore: resources i18n
This commit is contained in:
winwin2011
2022-10-08 22:27:23 +08:00
committed by GitHub
parent a323689ee6
commit 4ada7dce77
6 changed files with 61 additions and 23 deletions

View File

@ -1,3 +1,4 @@
import { useTranslation } from "react-i18next";
import Icon from "../Icon";
import { generateDialog } from "./BaseDialog";
import "../../less/common-dialog.less";
@ -18,15 +19,18 @@ const defaultProps = {
title: "",
content: "",
style: "info",
closeBtnText: "Close",
confirmBtnText: "Confirm",
closeBtnText: "common.close",
confirmBtnText: "common.confirm",
onClose: () => null,
onConfirm: () => null,
};
const CommonDialog: React.FC<Props> = (props: Props) => {
const { t } = useTranslation();
const { title, content, destroy, closeBtnText, confirmBtnText, onClose, onConfirm, style } = {
...defaultProps,
closeBtnText: t(defaultProps.closeBtnText),
confirmBtnText: t(defaultProps.confirmBtnText),
...props,
};