Add internationalization test against leading and trailing whitespace#10583
Merged
mitchellhenke merged 5 commits intomainfrom May 10, 2024
Merged
Add internationalization test against leading and trailing whitespace#10583mitchellhenke merged 5 commits intomainfrom
mitchellhenke merged 5 commits intomainfrom
Conversation
added 5 commits
May 9, 2024 14:29
changelog: Internal, Internationalization, Add consistency checks for whitespace in internationalization
zachmargolis
approved these changes
May 9, 2024
mitchellhenke
commented
May 10, 2024
Comment on lines
935
to
+938
| help_text.requested_attributes.ial2_consent_reminder_html: "<strong>%{sp}</stro\ | ||
| ng> needs to know who you are to connect to your account. You must consent each year to share your verified information with <strong>%{sp}</strong>. We’ll share this information: " | ||
| help_text.requested_attributes.ial2_intro_html: '<strong>%{sp}</strong> needs to know who you are to connect your account. We’ll share this information with %{sp}: ' | ||
| help_text.requested_attributes.ial2_reverified_consent_info: 'Because you verified your identity again, we need your permission to share this information with %{sp}: ' | ||
| ng> needs to know who you are to connect to your account. You must consent each year to share your verified information with <strong>%{sp}</strong>. We’ll share this information:" | ||
| help_text.requested_attributes.ial2_intro_html: '<strong>%{sp}</strong> needs to know who you are to connect your account. We’ll share this information with %{sp}:' | ||
| help_text.requested_attributes.ial2_reverified_consent_info: 'Because you verified your identity again, we need your permission to share this information with %{sp}:' |
Contributor
Author
There was a problem hiding this comment.
help_text.requested_attributes.ial2_consent_reminder_html
help_text.requested_attributes.ial2_intro_html
help_text.requested_attributes.ial2_reverified_consent_info
are all used here
for so the space removal should be safe.| idv.messages.gpo.timeframe_html: 你会在<strong> 5 到 10 天</strong> 里收到带有<strong>验证码</strong> 的信。 | ||
| idv.messages.otp_delivery_method_description: 如果你在上面输入的是座机电话,请在下边选择“接听电话”。 | ||
| idv.messages.phone.alert_html: '<strong>输入一个这样的电话号码:</strong> ' | ||
| idv.messages.phone.alert_html: '<strong>输入一个这样的电话号码:</strong>' |
Contributor
Author
There was a problem hiding this comment.
This was an inconsistency compared to the other languages and seems to have been a mistake.
| idv.warning.attempts_html.other: For security reasons, you have <strong>%{count} attempts</strong> remaining. | ||
| idv.warning.sessions.heading: We couldn’t find records matching your personal information | ||
| idv.warning.state_id.cancel_button: Exit %{app_name} | ||
| idv.warning.state_id.explanation: | |
Contributor
Author
There was a problem hiding this comment.
is the only usage of this content that I can fine, so it should be safe to remove the whitespace here.
| instructions.password.strength.3: Good | ||
| instructions.password.strength.4: Great | ||
| instructions.password.strength.intro: 'Password strength: ' | ||
| instructions.password.strength.intro: 'Password strength:' |
Contributor
Author
There was a problem hiding this comment.
Difference between deployed environment with existing space and testing locally with the space shows no difference in the rendered content for
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🛠 Summary of changes
With a few exceptions, we are rendering content in HTML where whitespace is not significant and won't be displayed. This PR adds a test to alert when we include such whitespace. Cases where we concatenate content like the following is a case where removal of whitespace would cause a change in the display, and will be validated prior to merging.
"#{t('content1')}#{t('content2')}"📜 Testing Plan
Provide a checklist of steps to confirm the changes.