Page MenuHomePhabricator

Decentralize phtize
ClosedPublic

Authored by vrana on Oct 18 2013, 2:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 2:29 AM
Unknown Object (File)
Sat, Dec 14, 8:48 AM
Unknown Object (File)
Wed, Dec 11, 2:15 PM
Unknown Object (File)
Mon, Dec 9, 1:44 AM
Unknown Object (File)
Thu, Dec 5, 6:52 AM
Unknown Object (File)
Thu, Dec 5, 5:12 AM
Unknown Object (File)
Thu, Dec 5, 2:04 AM
Unknown Object (File)
Wed, Dec 4, 4:25 PM

Details

Reviewers
epriestley
Commits
Restricted Diffusion Commit
rP00fb8c22e414: Decentralize phtize
Summary

The idea is to have all phtize definitions in applications to allow their separation.

Test Plan

Clicked View Options after mangling the translation.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I might have just forgotten an earlier discussion about this, but is there a reason this is desirable? One reason that it seems undesirable is that third party applications in the future won't be able to put code here. We've made good progress in moving almost everything else out of first-party files (for example, new PHID types can now be defined in third-party code) so centralizing this seems like a bit of a step backward.

Looks like it was added in D5759 without much discussion, so I'm not going crazy.

I guess an advantage is that a behavior which is invoked in multiple places doesn't need to duplicate its strings, but in the long term I think we'd need to move away from putting this stuff in Javelin. I guess this is probably no farther away from the right long-term fix than adding pht at the callsites.

If we want to use the same behavior on more places then we would have to specify the translation on all callsites. Although I agree that putting it on a central location isn't perfect for several reasons (another one is that I have to edit the code on three different places if I want to add a new behavior with translations).

I guess I will move it the other way around and we can deal with duplicates when we hit them, perhaps by writing a method to init a specific behavior.

vrana planned changes to this revision.Nov 4 2013, 4:40 PM
vrana updated this revision to Unknown Object (????).

Decentralize

vrana requested a review of this revision.Nov 4 2013, 4:41 PM