From: Andrew Dolgov Date: Wed, 13 Jan 2010 18:38:18 +0000 (+0300) Subject: localized_js: disable when translations are disabled in config.php X-Git-Tag: 1.4.0~54 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5eee1b4247922352b1eca819d9fc981e937e4a22;p=tt-rss.git localized_js: disable when translations are disabled in config.php --- diff --git a/localized_js.php b/localized_js.php index 5d443d4a..0d66da57 100644 --- a/localized_js.php +++ b/localized_js.php @@ -30,13 +30,16 @@ function __(msg) { 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); + } } ?>