(Update) Translations - if a message_template has been translated then get/render...
authorTim Otten <totten@civicrm.org>
Mon, 8 Aug 2022 09:05:12 +0000 (02:05 -0700)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 1 Sep 2022 06:51:02 +0000 (18:51 +1200)
commitafedf2149c764e5f2aba5600734e64167be50424
tree9786d0631a2ff6006eed4954019e1ecbb4126568
parent01b6270ba465914d7673ef3778940f76ad048506
(Update) Translations - if a message_template has been translated then get/render the translated version

* Updates for APIv4 calls
  * Set `$language` and `#ranslationMode()` instead of `$preferredLanguage`
  * Read 'actual_language' instead of `getTranslationLanguage()`
* Updates for tracking global locale properties
  * Use `$loacleObj->moneyFormat` instead of `$GLOBALS['moneyFormatLocale']` and `IGNORE_SEPARATOR_CONFIG`
  * Use `$tokenContext['locale']` instead of `$GLOBALS['moneyFormatLocale']` and `IGNORE_SEPARATOR_CONFIG`
* Split `testRenderTranslatedTemplate()` in two (for different configurations)
CRM/Core/BAO/MessageTemplate.php
Civi/Api4/Action/WorkflowMessage/Render.php
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php