diff --git a/app/helpers/verification_helper.rb b/app/helpers/verification_helper.rb new file mode 100644 index 000000000..a7615801e --- /dev/null +++ b/app/helpers/verification_helper.rb @@ -0,0 +1,9 @@ +module VerificationHelper + + def document_types + [[t('verification.residence.new.document_type.spanish_id'), 1], + [t('verification.residence.new.document_type.passport'), 2], + [t('verification.residence.new.document_type.residence_card'), 3]] + end + +end \ No newline at end of file diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index d45c73d9b..c1991cd64 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -24,6 +24,7 @@ data: - config/locales/%{locale}.yml - config/locales/admin.%{locale}.yml - config/locales/moderation.%{locale}.yml + - config/locales/verification.%{locale}.yml - config/locales/mailers.%{locale}.yml - config/locales/devise_views.%{locale}.yml - config/locales/responders.%{locale}.yml diff --git a/config/locales/activemodel.en.yml b/config/locales/activemodel.en.yml new file mode 100644 index 000000000..edf91fdc4 --- /dev/null +++ b/config/locales/activemodel.en.yml @@ -0,0 +1,16 @@ +en: + activemodel: + models: + residence: Residence + sms: SMS + attributes: + residence: + document_type: Document type + document_number: Document number(including letter) + date_of_birth: Date of birth + postal_code: Postal code + sms: + phone: 'Phone' + confirmation_code: 'Confirmation code' + email: + recipient: 'Email' \ No newline at end of file diff --git a/config/locales/activemodel.es.yml b/config/locales/activemodel.es.yml new file mode 100644 index 000000000..f72fdd385 --- /dev/null +++ b/config/locales/activemodel.es.yml @@ -0,0 +1,16 @@ +es: + activemodel: + models: + residence: Residencia + sms: SMS + attributes: + residence: + document_type: Tipo documento + document_number: Numero de documento (incluida letra) + date_of_birth: Fecha de nacimiento + postal_code: 'Código postal' + sms: + phone: 'Teléfono' + confirmation_code: 'Código de confirmación' + email: + recipient: 'Email' \ No newline at end of file diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index 94b1fa0c9..e78d86512 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -7,6 +7,7 @@ en: user: User vote: Vote organization: Organization + residence: Residencia attributes: comment: body: Comment diff --git a/config/locales/en.yml b/config/locales/en.yml index a255991da..bc40a7d6c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -29,6 +29,7 @@ en: accept_terms: I accept the privacy policy and the legal terms user: account debate: debate + sms: phone debates: index: create_debate: Create a debate @@ -124,6 +125,8 @@ en: phone_number_label: "Phone number" organization_name_label: "Organization name" notifications: Notifications + level_two_user: You are a level 2 user + level_three_user: You are a level 3 user simple_captcha: placeholder: "Enter the image value" label: "Enter the code in the box" diff --git a/config/locales/es.yml b/config/locales/es.yml index f37bc0545..e28be816c 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -29,6 +29,7 @@ es: accept_terms: Acepto la política de privacidad y el aviso legal user: la cuenta debate: el debate + sms: el teléfono debates: index: create_debate: Crea un debate @@ -124,6 +125,8 @@ es: phone_number_label: "Teléfono" organization_name_label: "Nombre de la organización" notifications: Notificaciones + level_two_user: Eres un usuario verificado de nivel 2 + level_three_user: Eres un usuario verificado de nivel 3 simple_captcha: placeholder: "Introduce el texto de la imagen" label: "Introduce el texto en la caja" diff --git a/config/locales/rails.es.yml b/config/locales/rails.es.yml index f29361c45..9a6e698d2 100644 --- a/config/locales/rails.es.yml +++ b/config/locales/rails.es.yml @@ -125,6 +125,7 @@ es: too_short: es demasiado corto (%{count} caracteres mínimo) wrong_length: no tiene la longitud correcta (%{count} caracteres exactos) other_than: debe ser distinto de %{count} + invalid_date: "no es una fecha valida" template: body: 'Se encontraron problemas con los siguientes campos:' header: diff --git a/config/locales/verification.en.yml b/config/locales/verification.en.yml new file mode 100644 index 000000000..f9b2db4fb --- /dev/null +++ b/config/locales/verification.en.yml @@ -0,0 +1,72 @@ +en: + verification: + residence: + new: + title: 'Verify residence' + document_type: + spanish_id: 'Spanish ID' + passport: 'Passport' + residence_card: 'Residence card' + form_errors: 'prevented your residence verification' + error_verifying_census: 'The census of the city of Madrid could not verify your information. Pero revise de information and try again or get in touch with us.' + create: + flash: + success: 'Residence verified' + alert: + verify_attemps_left: 'You have reached the maximum number of Census verification tries' + unconfirmed_residency: 'You have not yet confirmed your residence' + sms: + new: + title: Phone verification + submit_button: Send + create: + flash: + success: 'Enter the confirmation code we have sent your phone' + edit: + title: Security code confirmation + resend_sms_text: You have not received the confirmation code in your phone? + resend_sms_link: Click here to send the confirmation code again + submit_button: Send + update: + error: 'Incorrect confirmation code' + flash: + level_three: + success: 'Correct code. You are now a verified user' + level_two: + success: 'Correct code' + form: + submit_button: Send + alert: + verify_attemps_left: 'You have reached the maximum number of sms verification tries' + email: + show: + flash: + success: 'You are now a verified user' + alert: + failure: 'Incorrect verification code' + create: + flash: + success: "We have send you a confirmation email to your email account: %{email}" + alert: + failure: "There was a problem sending you an email to your account" + form: + submit_button: Send + letter: + new: + title: Final Verification + explanation: 'To completely verify your account we need to go to one of these offices or send you a letter with a special code to your home address' + submit_button: 'Send me a letter' + create: + flash: + success: "You will receive a letter to your home address in the next couple of days" + alert: + failure: "We could not verify your address with the Census please try again later" + alert: + unconfirmed_personal_data: 'You have not yet confirmed your personal data' + verified_user: + show: + title: Available information + email_title: Emails + phone_title: Phones + use_another_phone: Use another phone + diff --git a/config/locales/verification.es.yml b/config/locales/verification.es.yml new file mode 100644 index 000000000..b9cda6aed --- /dev/null +++ b/config/locales/verification.es.yml @@ -0,0 +1,71 @@ +es: + verification: + residence: + new: + title: 'Verificar residencia' + document_type: + spanish_id: 'DNI' + passport: 'Pasaporte' + residence_card: 'Tarjeta de residencia' + form_errors: 'evitaron verificar tu residencia' + error_verifying_census: 'El Padrón de Madrid no pudo verificar tu información. Revisa la información ó ponte en contacto con nosotros.' + create: + flash: + success: 'Residencia verificada' + alert: + verify_attemps_left: 'Has llegado al máximo número de intentos de verificar tu residencia.' + unconfirmed_residency: 'Aún no has verificado tu residencia' + sms: + new: + title: Verificación de teléfono móvil + submit_button: Enviar + create: + flash: + success: 'Introduce el código de confirmación que te hemos enviado por mensaje de texto' + edit: + title: 'Confirmación de código de seguridad' + resend_sms_text: '¿No has recibido un mensaje de texto con tu código de confirmación?' + resend_sms_link: 'Haz click aquí para volver a enviártelo' + submit_button: Enviar + update: + error: 'Código de confirmación incorrecto' + flash: + level_three: + success: 'Código correcto. Ya eres un usuario verificado' + level_two: + success: 'Código incorrecto' + form: + submit_button: Enviar + alert: + verify_attemps_left: 'Has llegado al máximo número de intentos de verificar tu teléfono.' + email: + show: + flash: + success: 'Eres un usuario verificado' + alert: + failure: 'Código de verificación incorrecto' + create: + flash: + success: "Te hemos enviado un email de confirmación a tu cuenta: %{email}" + alert: + failure: "Hubo un problema enviándote un email a tu cuenta" + form: + submit_button: Enviar + letter: + new: + title: Final Verification + explanation: 'To completely verify your account we need to go to one of these offices or send you a letter with a special code to your home address' + submit_button: 'Send me a letter' + create: + flash: + success: "You will receive a letter to your home address in the next couple of days" + alert: + failure: "We could not verify your address with the Census please try again later" + alert: + unconfirmed_personal_data: 'You have not yet confirmed your personal data' + verified_user: + show: + title: Información disponible + email_title: Emails + phone_title: Teléfonos + use_another_phone: Utilizar otro teléfono