Homec4science

Add a `phutil_person()` wrapper for the string extractor

Authored by epriestley <git@epriestley.com> on Nov 8 2016, 16:29.

Description

Add a phutil_person() wrapper for the string extractor

Summary:
Ref T5267. When extracting strings, we can currently statically infer information about plurality (via PhutilNumber and phutil_count) but not about gendered variables.

This adds a marker for gendered variables. Usage will be:

pht(
  '%s stood silently.',
  phutil_person($variable));

The string extractor can then annotate this as gendered during extraction.

Also, use more consistent terms for grammatical gender.

Test Plan: arc unit, see next diff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16822

Details

Committed
epriestley <git@epriestley.com>Nov 8 2016, 17:32
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU5dbc2a8e01f6: Add an optional pht() callback for collecting string frequencies
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUc6634479d0f1: Add a `phutil_person()` wrapper for the string extractor (authored by epriestley <git@epriestley.com>).Nov 8 2016, 17:32