From 5eee1b4247922352b1eca819d9fc981e937e4a22 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 13 Jan 2010 21:38:18 +0300 Subject: [PATCH] localized_js: disable when translations are disabled in config.php --- localized_js.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); + } } ?> -- 2.39.5