mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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:
@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user