Added notifications when flagging failed

This commit is contained in:
PepeFranco
2017-10-09 21:59:47 -05:00
parent 77d30bdbc1
commit c81d9c0bd1
4 changed files with 8 additions and 0 deletions
@@ -99,6 +99,7 @@ export default class FlagButton extends Component {
}
})
.catch((err) => {
this.props.notify('error', t('error.COMMENT_FLAG_FAILED'));
console.error(err);
});
} else {
@@ -109,6 +110,7 @@ export default class FlagButton extends Component {
}
})
.catch((err) => {
this.props.notify('error', t('error.USER_FLAG_FAILED'));
console.error(err);
});
}
+2
View File
@@ -206,6 +206,8 @@ en:
NOT_FOUND: "Resource not found"
ALREADY_EXISTS: "Resource already exists"
INVALID_ASSET_URL: "Assert URL is invalid"
COMMENT_FLAG_FAILED: "There was an issue reporting this comment"
COMMENT_USER_FAILED: "There was an issue reporting this user"
email: "Not a valid E-Mail"
confirm_password: "Passwords don't match. Please check again"
network_error: "Failed to connect to server. Check your internet connection and try again."
+2
View File
@@ -213,6 +213,8 @@ es:
username: "Los nombres pueden contener letras números y _"
USERNAME_IN_USE: "Este nombre ya está siendo usado."
USERNAME_REQUIRED: "Debe ingresar un nombre"
COMMENT_FLAG_FAILED: "Hubo un error reportando este comentario"
COMMENT_USER_FAILED: "Hubo un error reportando este usuario"
flag_comment: "Reportar este comentario"
flag_reason: "Razón por la que hacer este reporte (Opcional)"
flag_username: "Reportar el nombre de usuario"
+2
View File
@@ -215,6 +215,8 @@ pt_BR:
password: "A senha deve conter pelo menos 8 caracteres"
username: "Nomes de usuários podem conter números de letras e _ somente"
unexpected: "Ocorreu um erro inesperado. Desculpa!"
COMMENT_FLAG_FAILED: "Houve um problema relatando o comentário"
COMMENT_USER_FAILED: "Houve um problema relatando o usuário"
flag_comment: "Informe o comentário"
flag_reason: "Motivo do relatório (opcional)"
flag_username: "Informe o nome de usuário"