diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-13 04:08:44 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-13 04:08:44 +0400 |
commit | 330bde599424559dee2d08fef4fc1743aa76c2fe (patch) | |
tree | 731c3ee4a1a94c7bbe9578fdd45fe8bab9338666 /core | |
parent | aca4c43a782926d09cb404556a9dcd342ea24985 (diff) |
Refs #4151, fix regression caused by refactoring hack.
Diffstat (limited to 'core')
-rw-r--r-- | core/Translate.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/Translate.php b/core/Translate.php index b38d40e2ac..dbb6c6d3f6 100644 --- a/core/Translate.php +++ b/core/Translate.php @@ -163,7 +163,11 @@ class Translate */ public function getJavascriptTranslations() { - $translations = $GLOBALS['Piwik_translations']; + $translations = &$GLOBALS['Piwik_translations']; + + // Hack: common translations used in JS but not only, force them to be defined in JS + $translations['General']['Save_js'] = $translations['General']['Save']; + $translations['General']['OrCancel_js'] = $translations['General']['OrCancel']; $clientSideTranslations = array(); foreach ($this->getClientSideTranslationKeys() as $key) { @@ -188,8 +192,7 @@ class Translate { $moduleRegex = '#^.*_js$#i'; - // Hack: common translations used in JS but not only, force them to be defined in JS - $result = array('General_Save', 'General_OrCancel'); + $result = array(); Piwik_PostEvent(self::GET_CLIENT_SIDE_TRANSLATION_KEYS_EVENT, array(&$result)); |