mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
Replace with translation_key to manage error translation.
This commit is contained in:
@@ -26,7 +26,7 @@ export const createUsername = (userId, formData) => dispatch => {
|
||||
dispatch(updateUsername(formData));
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch(createUsernameFailure(lang.t(`error.${error.message}`)));
|
||||
dispatch(createUsernameFailure(lang.t(`error.${error.translation_key}`)));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@ export const fetchSignUp = (formData, redirectUri) => (dispatch) => {
|
||||
dispatch(signUpSuccess(user));
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch(signUpFailure(lang.t(`error.${error.message}`)));
|
||||
dispatch(signUpFailure(lang.t(`error.${error.translation_key}`)));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
errorCreate: 'Error when changing username',
|
||||
checkTheForm: 'Invalid Form. Please, check the fields',
|
||||
specialCharacters: 'Usernames can contain letters, numbers and _ only'
|
||||
},
|
||||
}
|
||||
},
|
||||
es: {
|
||||
'signIn': {
|
||||
|
||||
Reference in New Issue
Block a user