Page MenuHomePhabricator

Decentralize phtize
ClosedPublic

Authored by vrana on Oct 18 2013, 2:03 AM.
Tags
None
Referenced Files
F13224244: D7345.id16880.diff
Sun, May 19, 7:18 AM
F13223267: D7345.diff
Sun, May 19, 4:26 AM
F13183576: D7345.id16886.diff
Fri, May 10, 10:32 AM
F13183575: D7345.id16880.diff
Fri, May 10, 10:32 AM
F13183574: D7345.id16546.diff
Fri, May 10, 10:32 AM
F13183463: D7345.id.diff
Fri, May 10, 9:16 AM
F13183441: D7345.diff
Fri, May 10, 9:03 AM
F13178063: D7345.diff
Wed, May 8, 8:08 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