mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +00:00
fix translation (#6905)
* fix translation * change Successful to xxx updated * fix text
This commit is contained in:
@@ -34,7 +34,7 @@ class AddAbuseReportDialog extends React.Component {
|
||||
}
|
||||
seafileAPI.addAbuseReport(this.props.sharedToken, this.state.abuseType, this.state.description, this.state.reporter, this.props.filePath).then((res) => {
|
||||
this.props.toggleAddAbuseReportDialog();
|
||||
toaster.success(gettext('Success'), { duration: 2 });
|
||||
toaster.success(gettext('Abuse report added'), { duration: 2 });
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
this.setState({
|
||||
|
@@ -38,7 +38,7 @@ class RenameDepartmentDialog extends React.Component {
|
||||
seafileAPI.orgAdminUpdateDepartGroup(orgID, groupID, this.state.departmentName.trim()).then((res) => {
|
||||
this.props.toggle();
|
||||
this.props.onDepartmentNameChanged(res.data);
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Name updated'));
|
||||
}).catch(error => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
this.setState({ errMessage: errorMsg });
|
||||
|
@@ -61,7 +61,7 @@ class PublishWikiDialog extends React.Component {
|
||||
let wiki_id = this.props.wiki.id;
|
||||
wikiAPI.deletePublishWikiLink(wiki_id).then((res) => {
|
||||
this.setState({ url: '' });
|
||||
toaster.success(gettext('Successfully'));
|
||||
toaster.success(gettext('Wiki custom URL deleted'));
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
let errorMsg = error.response.data.error_msg;
|
||||
|
@@ -33,7 +33,7 @@ class RenameDepartmentDialog extends React.Component {
|
||||
seafileAPI.sysAdminRenameDepartment(this.props.groupID, this.state.departmentName.trim()).then((res) => {
|
||||
this.props.toggle();
|
||||
this.props.onDepartmentNameChanged(res.data);
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Department renamed'));
|
||||
}).catch(error => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
this.setState({ errMessage: errorMsg });
|
||||
|
@@ -38,7 +38,7 @@ const UserSetPassword = ({ toggle }) => {
|
||||
setErrorMessage('');
|
||||
setCanSubmit(false);
|
||||
userAPI.resetPassword(null, password).then(() => {
|
||||
toaster.success('Password set');
|
||||
toaster.success(gettext('Password set'));
|
||||
location.reload();
|
||||
toggle();
|
||||
}).catch(error => {
|
||||
|
@@ -45,7 +45,7 @@ const UserUpdatePassword = ({ toggle }) => {
|
||||
setErrorMessage('');
|
||||
setCanSubmit(false);
|
||||
userAPI.resetPassword(currentPassword, newPassword).then(() => {
|
||||
toaster.success('Password updated');
|
||||
toaster.success(gettext('Password updated'));
|
||||
toggle();
|
||||
}).catch(error => {
|
||||
const errMessage = Utils.getErrorMsg(error);
|
||||
|
@@ -54,7 +54,7 @@ class EmailNotice extends React.Component {
|
||||
e.preventDefault();
|
||||
let { fileUpdatesEmailInterval, collaborateEmailInterval } = this.state;
|
||||
seafileAPI.updateEmailNotificationInterval(fileUpdatesEmailInterval, collaborateEmailInterval).then((res) => {
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Email notification updated'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
toaster.danger(errorMsg);
|
||||
|
@@ -52,12 +52,11 @@ class UserAvatarForm extends React.Component {
|
||||
return false;
|
||||
}
|
||||
|
||||
// this.form.current.submit();
|
||||
seafileAPI.updateUserAvatar(file, 160).then((res) => {
|
||||
this.setState({
|
||||
avatarSrc: res.data.avatar_url
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Avatar updated'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
toaster.danger(errorMsg);
|
||||
|
@@ -35,7 +35,7 @@ class WebAPIAuthToken extends React.Component {
|
||||
authToken: res.data.token,
|
||||
isAuthTokenVisible: false
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Auth Token created'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
toaster.danger(errorMsg);
|
||||
@@ -48,7 +48,7 @@ class WebAPIAuthToken extends React.Component {
|
||||
authToken: '',
|
||||
isAuthTokenVisible: false
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Auth Token deleted'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
toaster.danger(errorMsg);
|
||||
|
@@ -34,7 +34,7 @@ class WebdavPassword extends React.Component {
|
||||
this.setState({
|
||||
isWebdavPasswordSetted: !this.state.isWebdavPasswordSetted,
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Password updated'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
this.toggleSetPasswordDialog();
|
||||
@@ -51,7 +51,7 @@ class WebdavPassword extends React.Component {
|
||||
resetPassword = (password) => {
|
||||
seafileAPI.updateWebdavSecret(password).then((res) => {
|
||||
this.toggleResetPasswordDialog();
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Password reset'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
this.toggleResetPasswordDialog();
|
||||
@@ -71,7 +71,7 @@ class WebdavPassword extends React.Component {
|
||||
this.setState({
|
||||
isWebdavPasswordSetted: !this.state.isWebdavPasswordSetted,
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
toaster.success(gettext('Password removed'));
|
||||
}).catch((error) => {
|
||||
let errorMsg = Utils.getErrorMsg(error);
|
||||
this.toggleRemovePasswordDialog();
|
||||
|
@@ -92,7 +92,7 @@ class WikiCardItem extends Component {
|
||||
wikiAPI.publishWiki(this.props.wiki.id, publish_url).then((res) => {
|
||||
const { publish_url } = res.data;
|
||||
this.setState({ customUrl: publish_url });
|
||||
toaster.success(gettext('Successfully.'));
|
||||
toaster.success(gettext('Wiki published'));
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
let errorMsg = error.response.data.error_msg;
|
||||
|
Reference in New Issue
Block a user