projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41a4239
)
Smarty {ts} -- For extensions, use fallback similar to E::ts() and JS ts()
author
Tim Otten
<totten@civicrm.org>
Thu, 19 Jan 2023 04:42:36 +0000
(20:42 -0800)
committer
Tim Otten
<totten@civicrm.org>
Thu, 19 Jan 2023 04:42:36 +0000
(20:42 -0800)
CRM/Core/Smarty/plugins/block.ts.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Smarty/plugins/block.ts.php
b/CRM/Core/Smarty/plugins/block.ts.php
index f3cbd36fe95276980d7d399a15152d825f897d5f..6c1faeffd010c62eb04c91554d40b4e1e2261cfa 100644
(file)
--- 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);
}