-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: foreign language in export #660
Conversation
✅ Deploy Preview for housing-sanjoseca-gov ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
I tested this out with the production db data and I'm still getting the non-english for this preference
{
"key": "Homeless or at Risk of Homelessness",
"claimed": true,
"options": [
{
"key": "Yo, o alguien de mi hogar, vivo en Berkeley y tengo un lugar donde quedarme, pero no es permanente",
"checked": true,
"extraData": []
},
{
"key": "Yo, o alguien de mi hogar, no tengo hogar y vivo en Berkeley, o no tengo hogar y tenía una dirección anterior en Berkeley",
"checked": true,
"extraData": []
},
{
"key": "I do not qualify for this preference.",
"checked": false,
"extraData": []
}
]
},
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 a minor comment. After merge can you make sure this is pulled into core right away?
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.
LGTM I think hba main needs a cherry pick of the netlify fix from core main
once I did that locally it worked perfectly!
Pull Request Template
Issue Overview
This PR addresses:
bloom-housing#3856
bloom-housing#3857
Description
Support Slack thread: https://exygy.slack.com/archives/C02G1S19QA2/p1707140129651329
Some applications with a specific preference were coming through as non-English, and sometimes they had periods at the end / other times they did not.
How Can This Be Tested/Reviewed?
Create a new preference with the following options:
I'm an option, and I have a comma, period, and apostrophe.
I'm a custom opt out option, and I also have all three.
The comma, period, and apostrophe are "characters" that react-hook-form removes from object keys. The issue was failing comparisons between the two versions of these strings, so everywhere we are comparing options, I'm stripping the characters. We honestly need a full overhaul of how we are mapping form data to the preference API - we should not be sending the key strings themselves, ideally the option IDs.
Both flows need to be tested in terms of either selecting the first option or the custom opt-out option.
A few additional issues surfaced in testing. The following should be true filling out an application in a foreign language (ideally Spanish):
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.