Improve i18n

This commit is contained in:
Gucheng Wang
2023-03-18 10:16:35 +08:00
parent bd5c706317
commit 28d24cc913
30 changed files with 634 additions and 690 deletions

View File

@ -143,8 +143,8 @@ export const CaptchaModal = (props) => {
}
return [
<Button key="cancel" onClick={handleCancel}>{i18next.t("user:Cancel")}</Button>,
<Button key="ok" disabled={isOkDisabled} type="primary" onClick={handleOk}>{i18next.t("user:OK")}</Button>,
<Button key="cancel" onClick={handleCancel}>{i18next.t("general:Cancel")}</Button>,
<Button key="ok" disabled={isOkDisabled} type="primary" onClick={handleOk}>{i18next.t("general:OK")}</Button>,
];
};
@ -155,8 +155,8 @@ export const CaptchaModal = (props) => {
destroyOnClose={true}
title={i18next.t("general:Captcha")}
open={open}
okText={i18next.t("user:OK")}
cancelText={i18next.t("user:Cancel")}
okText={i18next.t("general:OK")}
cancelText={i18next.t("general:Cancel")}
width={350}
footer={renderFooter()}
onCancel={handleCancel}

View File

@ -139,7 +139,8 @@ class PolicyTable extends React.Component {
if (res.status === "ok") {
this.setState({editingIndex: "", oldPolicy: "", add: false});
if (res.data !== "Affected") {
Setting.showMessage("info", i18next.t("adapter:Repeated policy rules"));
res.msg = i18next.t("adapter:Duplicated policy rules");
Setting.showMessage("error", `${i18next.t("general:Failed to add")}: ${res.msg}`);
} else {
Setting.showMessage("success", i18next.t("general:Successfully added"));
}