The idea is to have all phtize definitions in applications to allow their separation.
Details
- Reviewers
epriestley - Commits
- Restricted Diffusion Commit
rP00fb8c22e414: Decentralize phtize
Clicked View Options after mangling the translation.
Diff Detail
- Branch
- phtize
- Lint
Lint Passed - Unit
Tests Passed
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.