From 259064d3aee533f5b34232cfcc60d52cc8dd3bf8 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Thu, 22 Sep 2022 16:57:41 -0400 Subject: [PATCH 1/7] update alt tag to login.gov logo --- app/views/layouts/user_mailer.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 243a7b28278..5619c8c3563 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -46,6 +46,7 @@ attachments['logo.png'].url, size: '142x19', style: 'width: 142px; height: 19px;', + alt: 'Login.gov logo', ) %> From b2931a2deb16cba29d8e75a4ec58efb154fd7c17 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Thu, 22 Sep 2022 17:06:55 -0400 Subject: [PATCH 2/7] update user_mailer.html spec to include text for img alt text --- spec/views/layouts/user_mailer.html.erb_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/views/layouts/user_mailer.html.erb_spec.rb b/spec/views/layouts/user_mailer.html.erb_spec.rb index b05277588c1..8f0fa4e964a 100644 --- a/spec/views/layouts/user_mailer.html.erb_spec.rb +++ b/spec/views/layouts/user_mailer.html.erb_spec.rb @@ -19,6 +19,10 @@ expect(rendered).to have_css("img[src*='.mail']") end + it 'includes alt text for app logo that reads Login.gov logo' do + expect(rendered).to have_css("img[alt='Login.gov logo']") + end + it 'includes the message subject in the body' do expect(rendered).to have_content @mail.subject end From d30f322c1a689bdbb219cbe344649911cd2af9c3 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Fri, 23 Sep 2022 09:19:56 -0400 Subject: [PATCH 3/7] [skip changelog] From 48b08ddc853c47090c204c00588e7df1aa725cd9 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Fri, 23 Sep 2022 14:35:54 -0400 Subject: [PATCH 4/7] use var --- app/views/layouts/user_mailer.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 5619c8c3563..74910198f31 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -46,7 +46,7 @@ attachments['logo.png'].url, size: '142x19', style: 'width: 142px; height: 19px;', - alt: 'Login.gov logo', + alt: "#{APP_NAME} logo", ) %> From 93097e8975878deeabaa1bf39d48dd4bb8a98980 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Mon, 26 Sep 2022 11:41:00 -0400 Subject: [PATCH 5/7] move alt text to i18l files --- app/views/layouts/user_mailer.html.erb | 2 +- config/locales/mailer/en.yml | 1 + config/locales/mailer/es.yml | 1 + config/locales/mailer/fr.yml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 74910198f31..8ed95c823ec 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -46,7 +46,7 @@ attachments['logo.png'].url, size: '142x19', style: 'width: 142px; height: 19px;', - alt: "#{APP_NAME} logo", + alt: t('mailer.logo', app_name: APP_NAME), ) %> diff --git a/config/locales/mailer/en.yml b/config/locales/mailer/en.yml index 879ffe1ffcc..7efbe725413 100644 --- a/config/locales/mailer/en.yml +++ b/config/locales/mailer/en.yml @@ -5,5 +5,6 @@ en: email_reuse_notice: subject: This email address is already associated with an account. help: If you need help, visit %{link} + logo: '%{app_name} logo' no_reply: Please do not reply to this message. privacy_policy: Privacy policy diff --git a/config/locales/mailer/es.yml b/config/locales/mailer/es.yml index a372efd30d7..e9cd9abe3d7 100644 --- a/config/locales/mailer/es.yml +++ b/config/locales/mailer/es.yml @@ -5,5 +5,6 @@ es: email_reuse_notice: subject: Este email ya está asociado a una cuenta. help: Si necesita ayuda, visite %{link} + logo: '%{app_name} logo' no_reply: Por favor, no responda a este mensaje. privacy_policy: Póliza de privacidad diff --git a/config/locales/mailer/fr.yml b/config/locales/mailer/fr.yml index 973fd7b1a4a..ebcad3e0227 100644 --- a/config/locales/mailer/fr.yml +++ b/config/locales/mailer/fr.yml @@ -5,5 +5,6 @@ fr: email_reuse_notice: subject: Cette adresse courriel est déjà associée à un compte. help: Si vous avez besoin d’aide, visitez le site %{link} + logo: '%{app_name} logo' no_reply: Veuillez ne pas répondre à ce message. privacy_policy: Politique de confidentialité From 0d95ea540efedb46b7b66bdd6c24b5f2939e2a13 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Mon, 26 Sep 2022 13:48:12 -0400 Subject: [PATCH 6/7] update spec --- spec/views/layouts/user_mailer.html.erb_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/views/layouts/user_mailer.html.erb_spec.rb b/spec/views/layouts/user_mailer.html.erb_spec.rb index 8f0fa4e964a..d2acbf298de 100644 --- a/spec/views/layouts/user_mailer.html.erb_spec.rb +++ b/spec/views/layouts/user_mailer.html.erb_spec.rb @@ -20,7 +20,7 @@ end it 'includes alt text for app logo that reads Login.gov logo' do - expect(rendered).to have_css("img[alt='Login.gov logo']") + expect(rendered).to have_css("img[alt='#{t('mailer.logo', app_name: APP_NAME)}']") end it 'includes the message subject in the body' do From 05a2067b45e931bbb7c69b0b01a887160ff1f5c0 Mon Sep 17 00:00:00 2001 From: Shannon Alexander Date: Mon, 26 Sep 2022 14:00:18 -0400 Subject: [PATCH 7/7] update untranslated keys --- spec/i18n_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb index a19f6c95957..48f5da5c5b4 100644 --- a/spec/i18n_spec.rb +++ b/spec/i18n_spec.rb @@ -29,6 +29,7 @@ class BaseTask { key: 'time.pm' }, # "PM" is "PM" in French and Spanish { key: 'datetime.dotiw.minutes.one' }, # "minute is minute" in French and English { key: 'datetime.dotiw.minutes.other' }, # "minute is minute" in French and English + { key: 'mailer.logo' }, # "logo is logo" in English, French and Spanish ].freeze # rubocop:enable Layout/LineLength