Skip to content

Commit

Permalink
Refs #4151, fix regression caused by refactoring hack.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benaka Moorthi committed Sep 13, 2013
1 parent aca4c43 commit 330bde5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/Translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ public function getLanguageDefault()
*/
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) {
Expand All @@ -188,8 +192,7 @@ private function getClientSideTranslationKeys()
{
$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));

Expand Down

0 comments on commit 330bde5

Please sign in to comment.