Page MenuHomePhabricator

`pht` all the things
ClosedPublic

Authored by joshuaspence on Apr 29 2015, 12:58 PM.
Tags
None
Referenced Files
F13167304: D12606.diff
Tue, May 7, 7:03 AM
Unknown Object (File)
Fri, May 3, 5:06 AM
Unknown Object (File)
Wed, May 1, 7:36 PM
Unknown Object (File)
Thu, Apr 25, 12:45 AM
Unknown Object (File)
Thu, Apr 11, 9:47 AM
Unknown Object (File)
Apr 5 2024, 12:58 PM
Unknown Object (File)
Apr 2 2024, 6:10 AM
Unknown Object (File)
Mar 31 2024, 11:25 PM
Subscribers

Details

Summary

phtize basically all of the strings in rPHU.

Test Plan

¯\_(ツ)_/¯

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to `pht` all the things.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

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.

This revision is now accepted and ready to land.Apr 29 2015, 1:29 PM
joshuaspence marked an inline comment as done.
joshuaspence edited edge metadata.

Rebase

This revision was automatically updated to reflect the committed changes.