mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 18:54:03 +08:00
Fix broken error messages
This commit is contained in:
parent
b0d87f60ae
commit
4d9c81ef96
@ -91,7 +91,7 @@ class PermissionListPage extends BaseListPage {
|
||||
const {pagination} = this.state;
|
||||
this.fetch({pagination});
|
||||
} else {
|
||||
Setting.showMessage("error", `Users failed to upload: ${res.msg}`);
|
||||
Setting.showMessage("error", `${i18next.t("general:Failed to sync")}: ${res.msg}`);
|
||||
}
|
||||
} else if (status === "error") {
|
||||
Setting.showMessage("error", "File failed to upload");
|
||||
|
@ -83,7 +83,7 @@ class RoleListPage extends BaseListPage {
|
||||
const {pagination} = this.state;
|
||||
this.fetch({pagination});
|
||||
} else {
|
||||
Setting.showMessage("error", `Users failed to upload: ${res.msg}`);
|
||||
Setting.showMessage("error", `${i18next.t("general:Failed to sync")}: ${res.msg}`);
|
||||
}
|
||||
} else if (status === "error") {
|
||||
Setting.showMessage("error", "File failed to upload");
|
||||
|
@ -454,7 +454,7 @@ class SyncerEditPage extends React.Component {
|
||||
Setting.showMessage("success", i18next.t("syncer:Connect successfully"));
|
||||
} else {
|
||||
this.setState({testDbLoading: false});
|
||||
Setting.showMessage("error", i18next.t("syncer:Failed to connect") + ": " + res.msg);
|
||||
Setting.showMessage("error", `${i18next.t("syncer:Failed to connect")}: ${res.msg}`);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -223,7 +223,7 @@ class SignupPage extends React.Component {
|
||||
Setting.goToLinkSoft(this, this.getResultPath(application, values));
|
||||
}
|
||||
} else {
|
||||
Setting.showMessage("error", i18next.t(`signup:${res.msg}`));
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ export function sendCode(captchaType, captchaToken, clientSecret, method, countr
|
||||
Setting.showMessage("success", i18next.t("user:Verification code sent"));
|
||||
return true;
|
||||
} else {
|
||||
Setting.showMessage("error", i18next.t("user:" + res.msg));
|
||||
Setting.showMessage("error", res.msg);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user