mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
It has to be translation_key and not message.
This commit is contained in:
@@ -16,7 +16,7 @@ export const checkLogin = () => dispatch => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
dispatch(checkLoginFailure(`${error.message}`));
|
||||
dispatch(checkLoginFailure(`${error.translation_key}`));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export const submitUser = () => (dispatch, getState) => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
dispatch(installFailure(`${error.message}`));
|
||||
dispatch(installFailure(`${error.translation_key}`));
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -104,6 +104,6 @@ export const checkInstall = next => dispatch => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
dispatch(checkInstallFailure(`${error.message}`));
|
||||
dispatch(checkInstallFailure(`${error.translation_key}`));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -177,7 +177,7 @@ export const checkLogin = () => dispatch => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
dispatch(checkLoginFailure(`${error.message}`));
|
||||
dispatch(checkLoginFailure(`${error.translation_key}`));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class SuspendedAccount extends Component {
|
||||
editName(username)
|
||||
.then(() => location.reload())
|
||||
.catch((error) => {
|
||||
this.setState({alert: lang.t(`error.${error.message}`)});
|
||||
this.setState({alert: lang.t(`error.${error.translation_key}`)});
|
||||
});
|
||||
} else {
|
||||
this.setState({alert: lang.t('editName.error')});
|
||||
|
||||
Reference in New Issue
Block a user