-
Notifications
You must be signed in to change notification settings - Fork 166
Lint _html keys in YML files #8713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dc13fd9
445fa0b
e9f8afe
494d2e6
a6abbd0
d26f03c
50ad7df
752d41c
2be5594
9d37b27
3f73ec1
5ac1af1
a300659
2c0aa06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ def heading | |
| def description | ||
| case error | ||
| when 'piv_cac.already_associated' | ||
| t('instructions.mfa.piv_cac.already_associated_html', try_again: try_again_link) | ||
| t('instructions.mfa.piv_cac.already_associated_html', try_again_html: try_again_link) | ||
| when 'user.not_found' | ||
| t( | ||
| 'instructions.mfa.piv_cac.account_not_found_html', | ||
|
|
@@ -57,13 +57,13 @@ def description | |
| create_account: @view.link_to(t('links.create_account'), sign_up_email_url), | ||
| ) | ||
| when 'certificate.none' | ||
| t('instructions.mfa.piv_cac.no_certificate_html', try_again: try_again_link) | ||
| t('instructions.mfa.piv_cac.no_certificate_html', try_again_html: try_again_link) | ||
| when 'certificate.not_auth_cert' | ||
| t('instructions.mfa.piv_cac.not_auth_cert_html', please_try_again: please_try_again_link) | ||
| t('instructions.mfa.piv_cac.not_auth_cert_html', please_try_again_html: please_try_again_link) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [question, nonblocking] why are we sometimes saying please and sometimes not?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you asking about the specific copy? I'm not sure. Might be personal differences in how different engineers turn strings into keys |
||
| when 'token.http_failure' | ||
| t('instructions.mfa.piv_cac.http_failure') | ||
| else | ||
| t('instructions.mfa.piv_cac.did_not_work_html', please_try_again: please_try_again_link) | ||
| t('instructions.mfa.piv_cac.did_not_work_html', please_try_again_html: please_try_again_link) | ||
| end | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ def first_enabled_option_index | |
| def account_reset_link | ||
| t( | ||
| 'two_factor_authentication.account_reset.text_html', | ||
| link: @view.link_to( | ||
| link_html: @view.link_to( | ||
| t('two_factor_authentication.account_reset.link'), | ||
| account_reset_url(locale: LinkLocaleResolver.locale), | ||
| ), | ||
|
|
@@ -88,12 +88,15 @@ def account_reset_url(locale:) | |
| end | ||
|
|
||
| def account_reset_cancel_link | ||
| t( | ||
| 'two_factor_authentication.account_reset.pending_html', | ||
| cancel_link: @view.link_to( | ||
| t('two_factor_authentication.account_reset.cancel_link'), | ||
| account_reset_cancel_url(token: account_reset_token), | ||
| ), | ||
| safe_join( | ||
| [ | ||
| t('two_factor_authentication.account_reset.pending'), | ||
| @view.link_to( | ||
| t('two_factor_authentication.account_reset.cancel_link'), | ||
| account_reset_cancel_url(token: account_reset_token), | ||
| ), | ||
| ], | ||
| ' ', | ||
|
||
| ) | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,10 +24,11 @@ | |
| <p><%= t('notices.forgot_password.no_email_sent_explanation_start') %> | ||
| <%= f.button :button, t('links.resend'), class: 'usa-button--unstyled margin-left-05' %></p> | ||
|
|
||
| <% link = link_to( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I chose to inline this assignment |
||
| t('notices.forgot_password.use_diff_email.link'), | ||
| sign_up_email_path, | ||
| ) %> | ||
| <p><%= t('notices.forgot_password.use_diff_email.text_html', link: link) %></p> | ||
| <p> | ||
| <%= t( | ||
| 'notices.forgot_password.use_diff_email.text_html', | ||
| link_html: link_to(t('notices.forgot_password.use_diff_email.link'), sign_up_email_path), | ||
| ) %> | ||
| </p> | ||
| <p><%= t('instructions.forgot_password.close_window') %></p> | ||
| <% end %> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ | |
| <% end %> | ||
|
|
||
| <%= render PageHeadingComponent.new.with_content(t('forms.verify_profile.welcome_back')) %> | ||
| <%= sanitize t('forms.verify_profile.welcome_back_description'), tags: %w[p strong] %> | ||
| <%= t('forms.verify_profile.welcome_back_description_html') %> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah with hard coded string I don't think we gain much benefit from |
||
| <hr class="margin-y-4" /> | ||
| <h2><%= t('forms.verify_profile.title') %></h2> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify: Does the automated test catch that this should be
_html-suffixed, or was it manual? Since the HTML only comes at the runtime code viacontent_tagThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or I suppose you were able to work your way backward on the parent string (e.g.
number_message_html) that was otherwise flagged for an unnecessary_htmlto see why it was in-fact necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the parent tag had an un-necessary HTML without that