Skip to content

Fix and test for mismatched locale content#9801

Merged
aduth merged 1 commit intomainfrom
aduth-fix-french-spanish-mismatch
Dec 19, 2023
Merged

Fix and test for mismatched locale content#9801
aduth merged 1 commit intomainfrom
aduth-fix-french-spanish-mismatch

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Dec 19, 2023

🛠 Summary of changes

Fixes an issue where French and Spanish content are mismatched, contained within the others' locale data for identity verification information disclosure.

Also adds a new regression spec intended to try to catch these sorts of issues by checking for content patterns which are expected to only exist within specific locales.

See: https://github.com/18F/identity-idp/pull/9392/files#r1431752474

📜 Testing Plan

Repeat Testing Plan from #9392

Verify new tests pass:

rspec spec/i18n_spec.rb

Also observe that the tests would fail without the included content updates:

git checkout main -- config/locales/idv/es.yml config/locales/idv/fr.yml
rspec spec/i18n_spec.rb

changelog: Bug Fixes, Identity Verification, Fix incorrect information collection disclosure content for French and Spanish
@aduth
Copy link
Contributor Author

aduth commented Dec 19, 2023

We're currently in a content freeze, so this cannot be merged.

locale = key.split('.', 2).first.to_sym
other_locales = LOCALE_SPECIFIC_CONTENT.keys - [locale]
expect(value).not_to match(
Regexp.union(*LOCALE_SPECIFIC_CONTENT.slice(*other_locales).values),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 union of regexp.

Copy link
Contributor

@dawei-nava dawei-nava left a comment

Choose a reason for hiding this comment

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

LGTM

@aduth
Copy link
Contributor Author

aduth commented Dec 19, 2023

This is exempt from the content freeze because it's not modifying English content.

Related Slack discussion: https://gsa-tts.slack.com/archives/C0NGESUN5/p1703013201827089?thread_ts=1703012168.640379&cid=C0NGESUN5

@aduth aduth merged commit 414ec3d into main Dec 19, 2023
@aduth aduth deleted the aduth-fix-french-spanish-mismatch branch December 19, 2023 20:35
@jmdembe jmdembe mentioned this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants