(NFC) Upgrade - Improve example of an upgrade message for a new permission
authorTim Otten <totten@civicrm.org>
Wed, 15 Aug 2018 21:33:52 +0000 (14:33 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 15 Aug 2018 21:37:50 +0000 (14:37 -0700)
commite1a49d48cb321ef2f516d9c1548092610ad99239
tree1c06d2fbc49ae092e6fc84cdfdb4c5b574de3866
parent499a4fb3e33c8922e31540d41b2df99aba35f189
(NFC) Upgrade - Improve example of an upgrade message for a new permission

@bgm pointed out that the permission name should be translated as well.
This left me wondering...  why do we bother with parameterizing the string
with a `%1` if it's all going to be translated anyway?

There is a plausible reason.  It's not super-critical, but it's plausible --
the permission name is used in more contexts (like the permission mgmt
screen in D7/WP *as well as* the upgrade screen).  This arrangement ensures
that the name appears the same in *all those contexts*, even in various
edge-cases of the translation lifecycle (e.g.  where the permission-names
have been translated but the upgrade-messages have not).  Again...  it's not
a big deal, but it is a slightly better default.
CRM/Upgrade/Incremental/php/FiveFive.php
CRM/Upgrade/Incremental/php/FiveFour.php
CRM/Upgrade/Incremental/php/FiveOne.php
CRM/Upgrade/Incremental/php/FiveThree.php
CRM/Upgrade/Incremental/php/FiveZero.php
CRM/Upgrade/Incremental/php/Template.php