From 74227f77ff719e035cf291bfc816fd8ad50376a8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 13 Apr 2013 13:29:55 -0700 Subject: [PATCH] Remove needless string translation CRM-12339 --- CRM/Core/Resources.php | 4 +++- templates/CRM/common/scripts.tpl | 11 +---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index a86cfab467..c6a1096d69 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -425,7 +425,9 @@ class CRM_Core_Resources { $jsWeight = -9999; foreach ($files as $file => $type) { if ($type == 'js') { - $this->addScriptFile('civicrm', $file, $jsWeight++, $region, FALSE); + // Don't bother looking for ts() calls in packages, there aren't any + $translate = (substr($file, 0, 9) != 'packages/'); + $this->addScriptFile('civicrm', $file, $jsWeight++, $region, $translate); } elseif ($type == 'css') { $this->addStyleFile('civicrm', $file, -100, $region); diff --git a/templates/CRM/common/scripts.tpl b/templates/CRM/common/scripts.tpl index 625d13c650..26ba526b1d 100644 --- a/templates/CRM/common/scripts.tpl +++ b/templates/CRM/common/scripts.tpl @@ -42,16 +42,7 @@ {literal} var CRM = CRM || {}; CRM = cj.extend(true, { - strings: {{/literal} - '- select -': '{ts escape="js"}- select -{/ts}', - Ok: '{ts escape="js"}Ok{/ts}', - Cancel: '{ts escape="js"}Cancel{/ts}', - Yes: '{ts escape="js"}Yes{/ts}', - No: '{ts escape="js"}No{/ts}', - Saved: '{ts escape="js"}Saved{/ts}', - Error: '{ts escape="js"}Error{/ts}', - Removed: '{ts escape="js"}Removed{/ts}' - {literal}}, + strings: {}, config: {{/literal} urlIsPublic: {if $urlIsPublic}true{else}false{/if}, userFramework: '{$config->userFramework}', -- 2.25.1