Page MenuHomePhabricator

Decentralize phtize
ClosedPublic

Authored by vrana on Oct 18 2013, 2:03 AM.
Tags
None
Referenced Files
F14063042: D7345.diff
Mon, Nov 18, 4:19 PM
F14027772: D7345.id16886.diff
Fri, Nov 8, 9:10 AM
F14003367: D7345.id16886.diff
Sat, Oct 26, 5:27 AM
F13997443: D7345.diff
Thu, Oct 24, 4:33 AM
F13974125: D7345.id16546.diff
Oct 18 2024, 4:11 AM
F13968385: D7345.diff
Oct 16 2024, 8:34 PM
Unknown Object (File)
Oct 10 2024, 6:24 PM
Unknown Object (File)
Oct 3 2024, 6:07 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