Homec4science

Allow setting instance of PhutilTranslator

Authored by vrana <jakubv@fb.com> on Jun 16 2012, 05:20.

Description

Allow setting instance of PhutilTranslator

Summary:
I will need it for sending e-mails. The plan is this:

  • Set instance to recipient's language (or server default if multiplexing is disabled).
  • Build e-mails.
  • Set it back.

The other option would be to give up on using pht() and inject $translator everywhere and use it instead but it seems too complex even if it would be cleaner.

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1139

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

Details

Committed
vrana <jakubv@fb.com>Jun 18 2012, 23:07
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU2a263acd5e7f: Support male/female variations in translations
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHU36efb961c831: Allow setting instance of PhutilTranslator (authored by vrana <jakubv@fb.com>).Jun 18 2012, 23:07