]> git.wh0rd.org Git - tt-rss.git/commitdiff
localized_js: disable when translations are disabled in config.php
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 13 Jan 2010 18:38:18 +0000 (21:38 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 13 Jan 2010 18:38:18 +0000 (21:38 +0300)
localized_js.php

index 5d443d4ab776f9a4d7407390ec4274afc584f4f4..0d66da575d6d8b610f91a36df4994a437faeb390 100644 (file)
@@ -30,13 +30,16 @@ function __(msg) {
 
 <?php
 
-       $l10n = _get_reader();
+       if (ENABLE_TRANSLATIONS) {
 
-       for ($i = 0; $i < $l10n->total; $i++) {
-               $orig = $l10n->get_original_string($i);
-               $translation = __($orig);
+               $l10n = _get_reader();
 
-               print T_js_decl($orig, $translation);
+               for ($i = 0; $i < $l10n->total; $i++) {
+                       $orig = $l10n->get_original_string($i);
+                       $translation = __($orig);
+       
+                       print T_js_decl($orig, $translation);
+               }
        }
 
 ?>