From 5038c09d287dabe8fb20e092d16eae156ccb0522 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 18 Jan 2023 20:42:36 -0800 Subject: [PATCH] Smarty {ts} -- For extensions, use fallback similar to E::ts() and JS ts() --- CRM/Core/Smarty/plugins/block.ts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Smarty/plugins/block.ts.php b/CRM/Core/Smarty/plugins/block.ts.php index f3cbd36fe9..6c1faeffd0 100644 --- a/CRM/Core/Smarty/plugins/block.ts.php +++ b/CRM/Core/Smarty/plugins/block.ts.php @@ -34,8 +34,8 @@ * the string, translated by gettext */ function smarty_block_ts($params, $text, &$smarty) { - if (!isset($params['domain'])) { - $params['domain'] = $smarty->get_template_vars('extensionKey'); + if (!isset($params['domain']) && $extensionKey = $smarty->get_template_vars('extensionKey')) { + $params['domain'] = is_array($extensionKey) ? $extensionKey : [$extensionKey, NULL]; } return ts($text, $params); } -- 2.25.1