Use translation for default language, if exists
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 16 May 2023 04:07:14 +0000 (16:07 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 5 Jul 2023 20:24:56 +0000 (08:24 +1200)
commit2ec434cc4a9afacfd419dc0febf9ec35d678e405
tree279ea11c14a7f75e51d9a1f10e048a9650cc05f5
parent0eb62e4edd206859684efb7544af1921a586a895
Use translation for default language, if exists

There is an assumption in the code that for the default language a translation is not used.

However, the features around draft versions are all set up around
translations, so it becomes necessary to create translations
even for the default language. This change ensures they are
used if they exist.

Although we have a lot of complexity in the translation framework
on the rendering side I think assuming that where stuff is configured
people configured it to be used is a good underlying principle.
CRM/Core/BAO/Translation.php
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php