From 395bea7882bdafc272996285da549cccd6f7c5d2 Mon Sep 17 00:00:00 2001 From: gangelo Date: Tue, 30 Aug 2022 08:58:49 -0400 Subject: [PATCH 1/3] Add Spanish locale file (es) changelog: Upcoming Features, Accessibility, LG-7244 Translate the getting started page --- config/locales/inherited_proofing/es.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/config/locales/inherited_proofing/es.yml b/config/locales/inherited_proofing/es.yml index d43d06f3c65..0690e109889 100644 --- a/config/locales/inherited_proofing/es.yml +++ b/config/locales/inherited_proofing/es.yml @@ -2,15 +2,19 @@ es: inherited_proofing: buttons: - continue: replaceme + continue: Continuar headings: - welcome: replaceme + welcome: Empiece con la verificación de su identidad info: - no_sp_name: replaceme - privacy_html: replaceme %{app_name} %{link} - welcome_html: replaceme %{sp_name} + no_sp_name: La agencia a la que está intentando acceder + privacy_html: '%{app_name} es un sitio web gubernamental seguro que cumple con + las normas más estrictas de protección de datos. Solo utilizamos sus + datos para verificar su identidad. %{link} sobre nuestras medidas de + privacidad y seguridad.' + welcome_html: '%{sp_name} necesita asegurarse de que sea usted y no alguien que + se haga pasar por usted.' instructions: - bullet1: replaceme - learn_more: replaceme - privacy: replaceme - welcome: replaceme + bullet1: Un número de teléfono con un plan tarifario vinculado a su nombre. + learn_more: Obtenga más información + privacy: Nuestras normas de privacidad y seguridad + welcome: 'Deberá contar con lo siguiente para verificar su identidad:' From 2f7bb762392cc8805e5b74eb959cbc17d21f6cd8 Mon Sep 17 00:00:00 2001 From: gangelo Date: Tue, 30 Aug 2022 08:59:04 -0400 Subject: [PATCH 2/3] Add French locale file (fr) --- config/locales/inherited_proofing/fr.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/config/locales/inherited_proofing/fr.yml b/config/locales/inherited_proofing/fr.yml index b149f6518a4..a172530673d 100644 --- a/config/locales/inherited_proofing/fr.yml +++ b/config/locales/inherited_proofing/fr.yml @@ -2,15 +2,19 @@ fr: inherited_proofing: buttons: - continue: replaceme + continue: Continuer headings: - welcome: replaceme + welcome: Commencez à vérifier votre identité info: - no_sp_name: replaceme - privacy_html: replaceme %{app_name} %{link} - welcome_html: replaceme %{sp_name} + no_sp_name: L’agence à laquelle vous essayez d’accéder + privacy_html: '%{app_name} est un site gouvernemental sécurisé qui respecte les + normes les plus strictes en matière de protection des données. Nous + n’utilisons vos données uniquement pour vérifier votre identité. %{link} + sur nos mesures de confidentialité et de sécurité.' + welcome_html: '%{sp_name} doit s’assurer que vous êtes bien vous, et non + quelqu’un qui se fait passer pour vous.' instructions: - bullet1: replaceme - learn_more: replaceme - privacy: replaceme - welcome: replaceme + bullet1: Un numéro de téléphone associé à un forfait téléphonique à votre nom. + learn_more: En savoir plus + privacy: Nos normes de confidentialité et de sécurité + welcome: 'Pour vérifier votre identité, vous aurez besoin de:' From a34e27a4e6e80b3737431877cd03fa2b19be0d2d Mon Sep 17 00:00:00 2001 From: gangelo Date: Wed, 31 Aug 2022 08:04:12 -0400 Subject: [PATCH 3/3] Add specs to cover I18n Specifically, locale-specific rendered view content (:en, :fr, :es). --- .../get_started.html.erb_spec.rb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/spec/views/idv/inherited_proofing/get_started.html.erb_spec.rb b/spec/views/idv/inherited_proofing/get_started.html.erb_spec.rb index 81df22a560e..78a350c4fa0 100644 --- a/spec/views/idv/inherited_proofing/get_started.html.erb_spec.rb +++ b/spec/views/idv/inherited_proofing/get_started.html.erb_spec.rb @@ -3,6 +3,7 @@ describe 'idv/inherited_proofing/get_started.html.erb' do let(:flow_session) { {} } let(:sp_name) { nil } + let(:locale) { nil } before do @decorated_session = instance_double(ServiceProviderSessionDecorator) @@ -17,4 +18,36 @@ expect(rendered).to have_button(t('inherited_proofing.buttons.continue')) end + + describe 'I18n' do + before do + view.locale = locale + + render template: 'idv/inherited_proofing/get_started' + end + + context 'when rendered using the default locale' do + let(:locale) { nil } + + it 'renders the correct language' do + expect(rendered).to have_content('Get started verifying your identity') + end + end + + context 'when rendered using the French (:fr) locale' do + let(:locale) { :fr } + + it 'renders the correct language' do + expect(rendered).to have_content('Commencez à vérifier votre identité') + end + end + + context 'when rendered using the Spanish (:es) locale' do + let(:locale) { :es } + + it 'renders using the correct locale' do + expect(rendered).to have_content('Empiece con la verificación de su identidad') + end + end + end end