Tags: sagepe/fixmystreet
Tags
Fix issues with Open/Closed translated too early. It was possible for _hardcoded_states to be reached with no locale selected (e.g. bin/update-all-reports), causing an error trying to translate Open/Closed. But translating those there wasn't correct, because that would then be cached and returned even if a different language was being used. Caching was ignored in testing, which did not help. We no longer translate the state names in their objects, only upon display at the point that we will know the locale. We can't simply return the translation of Open/Closed because there may be entries in the translation table as well.
PreviousNext