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
Refactor: parameterize messages with agency-specific content #1196
Conversation
extract out the part that needs to vary ("an" vs. "a" if the agency's name starts with a vowel sound or not)
Some notes about the change from 4ae331b to 7df9e31: At first, in 4ae331b, I simply used The solution I came up with in 7df9e31 was to extract the "an MST" part as a property on |
My initial take on 7df9e31... I think this is a case where storing the entire first sentence is fine, rather than trying to deal with indefinite articles and placeholders where the overall/outside structure of the sentence has to change. It's OK to duplicate some content to make the code / language files more straightforward. I'm also not a huge fan of that format syntax needed for |
Yeah, I also felt like the approach in 7df9e31 is a little complicated. So just to be sure, are you saying we'd have |
Yeah, this is actually not because of
|
I'm suggesting you go even further, with these (eventual) entries - entire sentences:
I guess this is kind of the opposite of parameterizing the Seeing parameterization within sentences... it looks a little weird, different from doing this for e.g. links/HTML. E.g. What do you think? |
I see - the idea is to not have all these fragments floating around, even if that means some duplication. So it sounds like what we're leaning towards is, if we can easily reuse the agency's short-name/long-name/slug (like in
we should parameterize that. Otherwise, we should just have the full sentence represented on the model. My only question then is what to call the property on |
Yeah I think this is what I'm trying to get at, and matches what I was thinking in terms of a heuristic.
Tough question! 😅 Maybe |
this is to address the test failure and also is a valid case
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.
Yep this looks good 👍 I went through the PO file and don't see any other strings that should be parameterized or split into multiple versions.
Closes #1187
Run locally
Make sure to run with updated data migrations (sample data is updated) and run
./bin/init.sh
to recompile the language files.Before merging