diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-12 22:38:35 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-12 22:38:35 +0400 |
commit | e88b30a8eef746c65b4c0dfaa31a58d8e7dc0035 (patch) | |
tree | db9ea1a49301d2cb97e9195fbcb8554c54d6079f /core | |
parent | dfa487ed8624c2d0ec650e36b2f55d5fd7325b0f (diff) |
Refs #4151, make sure developing w/ merged assets disabled isn't a big pain.
Diffstat (limited to 'core')
-rw-r--r-- | core/AssetManager.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/AssetManager.php b/core/AssetManager.php index cf3e02c564..3013f1d41d 100644 --- a/core/AssetManager.php +++ b/core/AssetManager.php @@ -459,19 +459,21 @@ class AssetManager $isGenerated = self::isGenerated(self::TRANSLATIONS_JS_FILE); if (!$isGenerated) { - self::generateTranslationsJsFile(); + $translationJs = str_replace("\n", "\r\n", Translate::getInstance()->getJavascriptTranslations()); + self::writeAssetToFile($translationJs, self::TRANSLATIONS_JS_FILE); } return self::getAbsoluteMergedFileLocation(self::TRANSLATIONS_JS_FILE); } /** - * Generates the translations JS file. + * Remove translations Js file. + * + * @return string */ - public static function generateTranslationsJsFile() + public static function removeTranslationsJsFile() { - $translationJs = Translate::getInstance()->getJavascriptTranslations(); - self::writeAssetToFile($translationJs, self::TRANSLATIONS_JS_FILE); + self::removeMergedAsset(self::TRANSLATIONS_JS_FILE); } /** @@ -518,6 +520,7 @@ class AssetManager { self::removeMergedAsset(self::MERGED_CSS_FILE); self::removeMergedAsset(self::MERGED_JS_FILE); + self::removeMergedAsset(self::TRANSLATIONS_JS_FILE); } /** |