diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 19:45:55 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 19:45:55 +0000 |
commit | 0572a82a9163323088ef93f9703326b94a9dfad4 (patch) | |
tree | 1bf69332eba8be9d6b165985fb457ebe97e7454e /engine | |
parent | aedefa927ef2d35342b9e2366c77fbccc66308cf (diff) | |
download | elgg-0572a82a9163323088ef93f9703326b94a9dfad4.tar.gz elgg-0572a82a9163323088ef93f9703326b94a9dfad4.tar.bz2 |
Fixes #1166. get_installed_translations() only calculates completion if admin is logge din.
git-svn-id: http://code.elgg.org/elgg/trunk@3893 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/languages.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php index 35f406de8..98283f141 100644 --- a/engine/lib/languages.php +++ b/engine/lib/languages.php @@ -100,7 +100,7 @@ function elgg_echo($message_key, $language = "") { if (!$language) { $language = $CURRENT_LANGUAGE; } - + if (isset($CONFIG->translations[$language][$message_key])) { return $CONFIG->translations[$language][$message_key]; } else if (isset($CONFIG->translations["en"][$message_key])) { @@ -179,10 +179,11 @@ function get_installed_translations() { foreach ($CONFIG->translations as $k => $v) { $installed[$k] = elgg_echo($k, $k); - - $completeness = get_language_completeness($k); - if ((isadminloggedin()) && ($completeness<100) && ($k!='en')) { - $installed[$k] .= " (" . $completeness . "% " . elgg_echo('complete') . ")"; + if (isadminloggedin()) { + $completeness = get_language_completeness($k); + if (($completeness < 100) && ($k != 'en')) { + $installed[$k] .= " (" . $completeness . "% " . elgg_echo('complete') . ")"; + } } } @@ -240,4 +241,4 @@ function get_missing_language_keys($language) { return false; } -register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
\ No newline at end of file +register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/"); |