From 6f02450c9401e418b9396f913e5439b221cff42b Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 17 Nov 2016 16:21:13 -0300 Subject: [PATCH] Changes and translations --- client/coral-framework/helpers/error.js | 12 ++++++++---- .../coral-framework/helpers/translations.json | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 client/coral-framework/helpers/translations.json diff --git a/client/coral-framework/helpers/error.js b/client/coral-framework/helpers/error.js index 735ad7a5d..2a48c056d 100644 --- a/client/coral-framework/helpers/error.js +++ b/client/coral-framework/helpers/error.js @@ -1,6 +1,10 @@ +import I18n from 'coral-framework/modules/i18n/i18n'; +import translations from './translations'; +const lang = new I18n(translations); + export default { - email: 'Not a valid E-Mail', - password: 'Password must be at least 8 characters', - displayName: 'Display name is too short', - confirmPassword: 'Passwords don`t match. Please, check again' + email: lang.t('error.email'), + password: lang.t('error.password'), + displayName: lang.t('error.displayName'), + confirmPassword: lang.t('error.confirmPassword') }; diff --git a/client/coral-framework/helpers/translations.json b/client/coral-framework/helpers/translations.json new file mode 100644 index 000000000..f8ba0d35f --- /dev/null +++ b/client/coral-framework/helpers/translations.json @@ -0,0 +1,18 @@ +{ + "en": { + "error": { + "email": "Not a valid E-Mail", + "password": "Password must be at least 8 characters", + "displayName": "Display name is too short", + "confirmPassword": "Passwords don`t match. Please, check again" + } + }, + "es": { + "error": { + "email": "No es un email válido", + "password": "La contraseña debe tener por lo menos 8 caracteres", + "displayName": "El nombre es muy corto", + "confirmPassword": "Las contraseñas no coinciden" + } + } +}