Page MenuHomePhabricator

`pht` all the things
ClosedPublic

Authored by joshuaspence on Apr 29 2015, 12:58 PM.
Tags
None
Referenced Files
F14088580: D12606.diff
Sun, Nov 24, 4:47 AM
F14087334: D12606.diff
Sat, Nov 23, 8:59 PM
Unknown Object (File)
Fri, Nov 22, 10:12 AM
Unknown Object (File)
Mon, Nov 18, 7:22 AM
Unknown Object (File)
Fri, Nov 15, 8:51 AM
Unknown Object (File)
Thu, Nov 14, 1:47 AM
Unknown Object (File)
Sun, Nov 10, 4:01 AM
Unknown Object (File)
Wed, Nov 6, 3:44 AM
Subscribers

Details

Summary

phtize basically all of the strings in rPHU.

Test Plan

¯\_(ツ)_/¯

Diff Detail

Repository
rPHU libphutil
Branch
master
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:149XHP45PHP Compatibility
Errorsrc/utils/utils.php:1089XHP45PHP Compatibility
Errorsrc/utils/utils.php:1089XHP45PHP Compatibility
Unit
Tests Skipped
Build Status
Buildable 5763
Build 5782: [Placeholder Plan] Wait for 30 Seconds

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.