phtize basically all of the strings in rPHU.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rPHU13899e4637d3: `pht` all the things
¯\_(ツ)_/¯
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I suspect we may make some calls to functions in, e.g., utils.php before we install pht(), but since all the translated strings are on error pathways which we "should" never hit this still seems like the correct way forward on the balance.
There's a similar peril where pht() errors, and we call some function in error handling which calls pht() again, looping. However, we "should" never fail in handling an error. One possible inline about this.
(The number of library startup issues we've hit historically is about 0, so it would have to increase tremendously for me to have any real concerns about making them slightly more difficult to debug.)
src/error/PhutilErrorHandler.php | ||
---|---|---|
417–420 | Because this is specifically a reentry check, and one way we might end up here is by looping on an error in pht(), maybe this string is worth leaving untranslated. The concern is: pht -> error -> error handler -> some second error -> error handler -> ... Before the patch that leads to: ... -> clean abort Now it would lead to: ... -> pht -> error -> ... However, this also requires a peculiar conflux of circumstances. |