Add disclaimer about residence location to city/county/other incentives #153
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.
Description
See the code comment for rationale. This is the simplest, bluntest
possible approach. Other possibilities are:
Include the locality's name in this disclaimer message. This is not
trivial to do because, although the API returns authority names,
they're not necessarily suitable for interpolating into a
sentence. E.g. Denver is named
City and County of Denver
, whichdoes not work in an interpolation like
Limited to residents of ${name}
. (These names also aren't currently localized.)This approach also doesn't work for
other
-type incentives, becausethose authorities' names aren't place names.
Have the API somehow indicate when a locality match is ambiguous,
and only show the disclaimer in those cases. This would considerable
work on the backend, to improve its simplistic mapping of zip to
city and county name.
But given that we're imminently launching a state with local
incentives, I want to have something in place to cover this case.
The Spanish translation is from Google Translate, but I Googled the
phrase to confirm that very similar phrases are in wide use.
One final note:
other
-type incentives may be utility-based, notlocality-based, but the API doesn't convey that info.
Test Plan
Search for HVAC incentives in 80212 to get some Denver incentives;
make sure the text shows up on the city incentives but not on others.