Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/fonts/glyphs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!"#$%&'()+,-./0123456789:;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ «»¿ÀÁÈÉÊÎÓÚàáâãçèéêëíîïñóôùúû ‑—‘’“”…‹中体文简
!"#$%&'()+,-./0123456789:;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~ «»¿ÀÁÈÉÊÎÓÚàáâãçèéêëíîïñóôùúû ‑—‘’“”…‹中体文简
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not germane to your PR directly, but now that we've had to regenerate fonts twice within the past month or so, I'm left wondering how much we're really saving users. Semi-regular users would have had to re-download them on each update. It's probably still a net win, but with a narrowing margin.

(My point is that I think glyphindor or whatnot isn't hugely valuable and could be phased out, not that you should try to work around the fact that the linter made you regenerate fonts here.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous update was due to a bug. Similarly, as commented earlier, I don't think we'd really need to update these fonts here.

I think there's also an interesting discussion to be had whether to question why we're introducing new punctuation that we don't use anywhere else, and whether that's something we should want to avoid.

It's hard to argue in favor of end-user performance vs. developer ergonomics when we personally encounter the latter more often, but I still feel quite favorable to this optimization, and think we can continue to smooth out some of the rough edges.

Binary file modified app/assets/fonts/public-sans/PublicSans-Black.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-BlackItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Bold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-BoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraBold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraBoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraLight.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraLightItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Italic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Light.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-LightItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Medium.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-MediumItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Regular.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-SemiBold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-SemiBoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Thin.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ThinItalic.woff2
Binary file not shown.
12 changes: 12 additions & 0 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ def account_verified(date_time:, sp_name:)
end
end

def account_verified_but_not_connected(date_time:, sp_name:, sp_url:)
with_user_locale(user) do
@date = I18n.l(date_time, format: :event_date)
@sp_name = sp_name
@sp_url = sp_url
mail(
to: email_address.email,
subject: t('user_mailer.account_verified_but_not_connected.subject', sp_name: @sp_name),
)
end
end

def in_person_completion_survey
with_user_locale(user) do
@header = t('user_mailer.in_person_completion_survey.header')
Expand Down
16 changes: 11 additions & 5 deletions app/views/user_mailer/account_verified.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
sp_name: @sp_name,
app_name: APP_NAME,
date: @date,
change_password_link_html: link_to(
t('user_mailer.account_verified.change_password_link'),
new_user_password_url,
),
contact_link_html: link_to(t('user_mailer.account_verified.contact_link'), MarketingSite.contact_url),
) %>
</p>

Expand All @@ -29,3 +24,14 @@
</th>
</tr>
</table>

<p>
<%= t(
'user_mailer.account_verified.help_html',
change_password_link_html: link_to(
t('user_mailer.account_verified.change_password_link'),
new_user_password_url,
),
contact_link_html: link_to(t('user_mailer.account_verified.contact_link'), MarketingSite.contact_url),
) %>
</p>
47 changes: 47 additions & 0 deletions app/views/user_mailer/account_verified_but_not_connected.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<p class="lead">
<%= t(
'user_mailer.account_verified_but_not_connected.intro',
app_name: APP_NAME,
date: @date,
) %>
</p>

<p class="lead">
<%= t(
'user_mailer.account_verified_but_not_connected.instructions_html',
sp_name: @sp_name,
) %>
</p>

<p>
<%= link_to @sp_url, @sp_url %>
</p>

<table class="spacer">
<tbody>
<tr>
<td class="s10" height="10px">
&nbsp;
</td>
</tr>
</tbody>
</table>

<table class="hr">
<tr>
<th>
&nbsp;
</th>
</tr>
</table>

<p>
<%= t(
'user_mailer.account_verified_but_not_connected.help_html',
change_password_link_html: link_to(
t('user_mailer.account_verified_but_not_connected.change_password_link'),
new_user_password_url,
),
contact_link_html: link_to(t('user_mailer.account_verified_but_not_connected.contact_link'), MarketingSite.contact_url),
) %>
</p>
11 changes: 9 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1801,10 +1801,17 @@ user_mailer.account_reset_request.cancel: Don’t want to delete your account? S
user_mailer.account_reset_request.header: Your account will be deleted in %{interval}
user_mailer.account_reset_request.intro_html: 'As a security measure, %{app_name} requires a two-step process to delete your account:<br><br> Step One: There is a waiting period of %{waiting_period} if you have lost access to your authentication methods and need to delete your account. If you locate your authentication methods, you can sign in to your %{app_name} account to cancel this request.<br><br> Step Two: After the waiting period of %{waiting_period}, you will receive an email that will ask you to confirm the deletion of your %{app_name} account. Your account will not be deleted until you confirm.'
user_mailer.account_reset_request.subject: How to delete your %{app_name} account
user_mailer.account_verified_but_not_connected.change_password_link: change your password
user_mailer.account_verified_but_not_connected.contact_link: contact us
user_mailer.account_verified_but_not_connected.help_html: If you did not perform this action, please %{contact_link_html} and sign in to %{change_password_link_html}.
user_mailer.account_verified_but_not_connected.instructions_html: Sign back in at the <strong>%{sp_name}</strong> website to connect your verified information and access services.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my vote is to move the strong tag into the ERB

Suggested change
user_mailer.account_verified_but_not_connected.instructions_html: Sign back in at the <strong>%{sp_name}</strong> website to connect your verified information and access services.
user_mailer.account_verified_but_not_connected.instructions_html: Sign back in at the %{sp_name_html} website to connect your verified information and access services.

user_mailer.account_verified_but_not_connected.intro: You verified your identity with %{app_name} on %{date}
user_mailer.account_verified_but_not_connected.subject: '[Action required] Connect your information to %{sp_name}.'
user_mailer.account_verified.change_password_link: change your password
user_mailer.account_verified.contact_link: contact us
user_mailer.account_verified.intro_html: You successfully verified your identity with %{sp_name} on %{date} using %{app_name}. If you did not perform this action, please %{contact_link_html} and sign in to %{change_password_link_html}.
user_mailer.account_verified.subject: You verified your identity with %{sp_name}.
user_mailer.account_verified.help_html: If you did not perform this action, please %{contact_link_html} and sign in to %{change_password_link_html}.
user_mailer.account_verified.intro_html: On %{date}, you used %{app_name} to:<ul><li>Verify your identity</li><li>Connect your verified information to %{sp_name}</li></ul>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the spirit of moving HTML into ERBs, I think it would be worth considering moving each sentence/bullet into its own key, and then leave the HTML markup in the template

user_mailer.account_verified.subject: You verified your identity for %{sp_name}.
user_mailer.add_email_associated_with_another_account.help_html: If you did not request a new email or suspect an error, please visit the %{app_name_html} %{help_link_html} or %{contact_link_html}.
user_mailer.add_email_associated_with_another_account.intro_html: This email address is already associated with a %{app_name_html} account, so we can’t add it to another account. You must first delete or remove it from the account it is associated with. To do this, follow the link below and sign in with this email address. If you are not trying to add this email address to an account, you can ignore this message.
user_mailer.add_email_associated_with_another_account.link_text: Go to %{app_name}
Expand Down
15 changes: 11 additions & 4 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1813,10 +1813,17 @@ user_mailer.account_reset_request.cancel: '¿No desea eliminar su cuenta? Inicie
user_mailer.account_reset_request.header: Su cuenta será eliminada en %{interval}
user_mailer.account_reset_request.intro_html: 'Como medida de seguridad, %{app_name} requiere un proceso de dos pasos para eliminar su cuenta:<br><br> Paso uno: Hay un período de espera de %{waiting_period} si perdió el acceso a sus métodos de autenticación y necesita eliminar su cuenta. Si encuentra sus métodos de autenticación, puede iniciar sesión en su cuenta %{app_name} para cancelar esta solicitud.<br><br> Paso dos: Tras el período de espera de %{waiting_period}, recibirás un correo electrónico en el que te pediremos que confirmes la eliminación de tu cuenta %{app_name}. Tu cuenta no se eliminará hasta que lo confirmes.'
user_mailer.account_reset_request.subject: Cómo eliminar su cuenta de %{app_name}
user_mailer.account_verified.change_password_link: cambie su contraseña
user_mailer.account_verified.contact_link: contáctenos
user_mailer.account_verified.intro_html: El %{date}, verificó correctamente su identidad con %{sp_name} usando %{app_name}. Si usted no efectuó esta acción, vaya a %{contact_link_html} e inicie sesión para %{change_password_link_html}.
user_mailer.account_verified.subject: Verificó su identidad con %{sp_name}
user_mailer.account_verified_but_not_connected.change_password_link: cambiar su contraseña
user_mailer.account_verified_but_not_connected.contact_link: contacte con nosotros
user_mailer.account_verified_but_not_connected.help_html: Si usted no efectuó esta acción, %{contact_link_html} e inicie sesión para %{change_password_link_html}.
user_mailer.account_verified_but_not_connected.instructions_html: Vuelva a iniciar sesión en el sitio web de <strong>%{sp_name}</strong> para conectar su información verificada y acceder a los servicios.
user_mailer.account_verified_but_not_connected.intro: Usted verificó su identidad con %{app_name} el %{date}.
user_mailer.account_verified_but_not_connected.subject: '[Acción requerida] Conecte su información a %{sp_name}'
user_mailer.account_verified.change_password_link: cambiar su contraseña
user_mailer.account_verified.contact_link: contacte con nosotros
user_mailer.account_verified.help_html: Si usted no efectuó esta acción, %{contact_link_html} e inicie sesión para %{change_password_link_html}.
user_mailer.account_verified.intro_html: El %{date}, usted usó %{app_name} para:<ul><li>Verificar su identidad</li><li>Conectar su información verificada a %{sp_name}</li></ul>
user_mailer.account_verified.subject: Usted verificó su identidad para %{sp_name}
user_mailer.add_email_associated_with_another_account.help_html: Si no solicitó un nuevo correo electrónico o sospecha que hubo un error, visite %{help_link_html} de %{app_name_html} o %{contact_link_html}.
user_mailer.add_email_associated_with_another_account.intro_html: Esta dirección de correo electrónico ya está asociada con una cuenta de %{app_name_html}, por lo que no podemos agregarla a otra cuenta. Primero, debe eliminarla o quitarla de la cuenta con la que está asociada. Para hacerlo, siga este vínculo e inicie sesión con esta dirección de correo electrónico. Si no está intentando agregar esta dirección de correo electrónico a una cuenta, puede ignorar este mensaje.
user_mailer.add_email_associated_with_another_account.link_text: Ir a %{app_name}
Expand Down
11 changes: 9 additions & 2 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1801,10 +1801,17 @@ user_mailer.account_reset_request.cancel: Vous ne voulez pas supprimer votre com
user_mailer.account_reset_request.header: Votre compte sera supprimé dans %{interval}
user_mailer.account_reset_request.intro_html: 'Par mesure de sécurité, %{app_name} nécessite un processus en deux étapes pour supprimer votre compte: <br> <br> Étape 1: Il y a un delai d’attente de %{waiting_period} si vous avez perdu l’accès à vos méthodes d’authentification et devez supprimer votre compte. Si vous trouvez vos méthodes d’authentification, vous pouvez vous connecter à votre compte %{app_name} pour annuler cette demande. <br> <br> Deuxième étape: après la période d’attente de %{waiting_period}, vous recevrez un e-mail qui vous demandera de confirmer la suppression de votre compte %{app_name}. Votre compte ne sera pas supprimé tant que vous n’aurez pas confirmé.'
user_mailer.account_reset_request.subject: Comment supprimer votre compte %{app_name}
user_mailer.account_verified_but_not_connected.change_password_link: changer votre mot de passe
user_mailer.account_verified_but_not_connected.contact_link: nous contacter
user_mailer.account_verified_but_not_connected.help_html: Si vous n’avez pas effectué cette action, veuillez %{contact_link_html} et vous connecter pour %{change_password_link_html}.
user_mailer.account_verified_but_not_connected.instructions_html: Connectez-vous à nouveau sur le site <strong>%{sp_name}</strong> pour y associer vos renseignements confirmés et accéder aux services.
user_mailer.account_verified_but_not_connected.intro: Le %{date}, vous avez confirmé votre identité auprès de %{app_name}.
user_mailer.account_verified_but_not_connected.subject: '[Action requise] Connectez vos renseignements à %{sp_name}.'
user_mailer.account_verified.change_password_link: changer votre mot de passe
user_mailer.account_verified.contact_link: nous contacter
user_mailer.account_verified.intro_html: Le %{date}, vous avez réussi à confirmer votre identité auprès de %{sp_name} à l’aide de %{app_name}. Si vous n’avez pas effectué cette action, veuillez %{contact_link_html} et vous connecter pour %{change_password_link_html}.
user_mailer.account_verified.subject: Vous avez confirmé votre identité avec %{sp_name}.
user_mailer.account_verified.help_html: Si vous n’avez pas effectué cette action, veuillez %{contact_link_html} et vous connecter pour %{change_password_link_html}.
user_mailer.account_verified.intro_html: Le %{date}, vous avez utilisé %{app_name} pour :<ul><li>Confirmer votre identité</li><li>Connecter vos renseignements confirmés à %{sp_name}</li></ul>
user_mailer.account_verified.subject: Vous avez confirmé votre identité auprès de %{sp_name}.
user_mailer.add_email_associated_with_another_account.help_html: Si vous n’avez pas demandé de nouvel e-mail ou suspectez une erreur, veuillez visiter le %{help_link_html} de %{app_name_html} ou %{contact_link_html}.
user_mailer.add_email_associated_with_another_account.intro_html: Cette adresse e-mail est déjà associée à un compte %{app_name_html}, nous ne pouvons donc pas l’ajouter à un autre compte. Vous devez d’abord la supprimer ou la retirer du compte auquel elle est associée. Pour ce faire, suivez le lien ci-dessous et connectez-vous avec cette adresse e-mail. Si vous n’essayez pas d’ajouter cette adresse e-mail à un compte, vous pouvez ignorer ce message.
user_mailer.add_email_associated_with_another_account.link_text: Allez sur %{app_name}
Expand Down
13 changes: 10 additions & 3 deletions config/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1814,10 +1814,17 @@ user_mailer.account_reset_request.cancel: 不想删除你的账户?登入你
user_mailer.account_reset_request.header: 你的账户会在%{interval}后删除。
user_mailer.account_reset_request.intro_html: 作为一项安全措施,%{app_name} 要求一个两步流程来删除你的帐户:<br><br> 第一步:如果你丢失了身份证实方法但需删除账户,有一个%{waiting_period} 的等待期。如果你找到了身份证实方法,可以登录你的 %{app_name} 帐户来取消这个请求。<br><br> 第二步:%{waiting_period}等待期之后,你会收到一封电邮,请你确认要删除 %{app_name} 账户。只有经你确认后,你的账户才会被删除。
user_mailer.account_reset_request.subject: 如何删除你的 %{app_name} 账户
user_mailer.account_verified.change_password_link: 更改密码
user_mailer.account_verified_but_not_connected.change_password_link: 更改您的密码
user_mailer.account_verified_but_not_connected.contact_link: 联系我们
user_mailer.account_verified_but_not_connected.help_html: 如果您没有采取过这个行动,请 %{contact_link_html} 并登录以 %{change_password_link_html}。
user_mailer.account_verified_but_not_connected.instructions_html: 重新登录 <strong>%{sp_name}</strong> 网站以连接您验证过的信息并获得服务。
user_mailer.account_verified_but_not_connected.intro: 您已于 %{date} 在 %{app_name} 上验证了身份。
user_mailer.account_verified_but_not_connected.subject: '[需要采取行动] 将您的信息连接到 %{sp_name}'
user_mailer.account_verified.change_password_link: 更改您的密码
user_mailer.account_verified.contact_link: 联系我们
user_mailer.account_verified.intro_html: 你于 %{date} 使用 %{app_name} 在 %{sp_name}成功验证了身份。如果你没有采取这一行动,请 %{contact_link_html} 并登录 %{change_password_link_html}。
user_mailer.account_verified.subject: 你在 %{sp_name} 验证了身份。
user_mailer.account_verified.help_html: 如果您没有采取过这个行动,请 %{contact_link_html} 并登录以 %{change_password_link_html}。
user_mailer.account_verified.intro_html: 在 %{date},您使用了 %{app_name} 来:<ul><li>验证您的身份</li><li>将您验证过的信息连接到 %{sp_name}</li></ul>
user_mailer.account_verified.subject: 您已为 %{sp_name} 验证了身份
user_mailer.add_email_associated_with_another_account.help_html: 如果你没有要求一封新电邮或怀疑有错, 请访问 %{app_name_html}的 %{help_link_html} 或者 %{contact_link_html}。
user_mailer.add_email_associated_with_another_account.intro_html: 该电邮地址已与一个 %{app_name_html}账户相关联,所以我们不能把它加到另外一个账户上。你必须首先将其从与之相关的账户中删除或去掉。要做到这一点,点击以下链接并用该电邮地址登录。如果你没有试图将此电邮地址加到一个账户,可忽略这一信息。
user_mailer.add_email_associated_with_another_account.link_text: 请到 %{app_name}
Expand Down
10 changes: 10 additions & 0 deletions spec/mailers/previews/user_mailer_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ def account_verified
)
end

def account_verified_but_not_connected
UserMailer.with(
user: user, email_address: email_address_record,
).account_verified_but_not_connected(
date_time: DateTime.now,
sp_name: 'Example App',
sp_url: 'https://www.example.com/',
)
end

def in_person_completion_survey
UserMailer.with(user: user, email_address: email_address_record).in_person_completion_survey
end
Expand Down
32 changes: 32 additions & 0 deletions spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,38 @@ def expect_email_body_to_have_help_and_contact_links
end
end

describe '#account_verified_but_not_connected' do
let(:sp_name) { '' }
let(:sp_url) { 'https://www.example.com' }
let(:date_time) { Time.zone.now }
let(:mail) do
UserMailer.with(user: user, email_address: email_address).
account_verified_but_not_connected(date_time: date_time, sp_name: sp_name, sp_url: sp_url)
end

it_behaves_like 'a system email'
it_behaves_like 'an email that respects user email locale preference'

it 'sends to the current email' do
expect(mail.to).to eq [email_address.email]
end

it 'renders the subject' do
expect(mail.subject).to eq t(
'user_mailer.account_verified_but_not_connected.subject',
sp_name: sp_name,
)
end

it 'links to the forgot password page' do
expect(mail.html_part.body).to have_selector("a[href='#{new_user_password_url}']")
end

it 'links to the sp URL' do
expect(mail.html_part.body).to have_selector("a[href='#{sp_url}']")
end
end

context 'in person emails' do
let(:current_address_matches_id) { false }
let!(:enrollment) do
Expand Down