Page MenuHomePhabricator

Extract variable type information from pht() calls
ClosedPublic

Authored by epriestley on Nov 8 2016, 4:16 PM.
Tags
None
Referenced Files
F14060094: D16823.diff
Sun, Nov 17, 11:11 PM
F14050560: D16823.id40511.diff
Thu, Nov 14, 7:16 PM
F14048256: D16823.id40511.diff
Thu, Nov 14, 7:16 AM
F14046940: D16823.diff
Thu, Nov 14, 12:47 AM
F14033756: D16823.diff
Sat, Nov 9, 7:50 PM
F14029981: D16823.id40511.diff
Fri, Nov 8, 10:42 PM
F14029771: D16823.diff
Fri, Nov 8, 9:17 PM
F14020734: D16823.diff
Wed, Nov 6, 1:45 AM
Subscribers
None

Details

Summary

Ref T5267. When extrating data from pht() calls, also extract the argument types and export them into the map so they can be used by consumers.

We recognize plurals (phutil_count(), new PhutilNumber) and genders (phutil_person()). We'll need to annotate the codebase for those, since they're currently runtime-only.

Test Plan

Rebuilt extraction maps, got data like this (note "number" type annotation).

"Scaling pool \"%s\" up to %s daemon(s).": {
  "uses": [
    {
      "file": "/daemon/PhutilDaemonOverseer.php",
      "line": 378
    }
  ],
  "types": [
    null,
    "number"
  ]
},

Diff Detail

Repository
rP Phabricator
Branch
i18nextract
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14400
Build 18757: Run Core Tests
Build 18756: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Extract variable type information from pht() calls.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 8 2016, 4:18 PM
This revision was automatically updated to reflect the committed changes.