From 1559b68aaa01e03ae96a22456004a499dd651d96 Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Sun, 6 Apr 2008 19:39:21 +0000 Subject: [PATCH] MDL-13997 Correct linking between missing mode and compare mode. --- admin/lang.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/admin/lang.php b/admin/lang.php index ebec49bbbe..582b0ac136 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -290,7 +290,10 @@ $missingcounter++; $totalcounter->missing++; } - if (LANG_LINK_MISSING_STRINGS && $missingstring) { + if ($translationsdiffer) { + $missingcounter++; + } + if (LANG_LINK_MISSING_STRINGS && ($missingstring || $translationsdiffer)) { $missinglinkstart = ""; $missinglinkend = ''; } else { @@ -586,12 +589,13 @@ $value2 = lang_fix_value_from_file($localstring[$key]); } error_reporting($CFG->debug); - - // Color highlighting: - // red #ef6868 - translation missing in both system and local pack - // yellow #feff7f - translation missing in system pack but is translated in local - // green #AAFFAA - translation present in both system and local but is different + $missingtarget = ''; + $missingnext = ''; + $missingprev = ''; + $cellcolour = ''; + $usetabindex = false; if (!$value) { + // the string is not present in the pack being processed if (!$value2) { $cellcolour = 'class="bothmissing"'; $usetabindex = true; @@ -606,22 +610,21 @@ ''.$strnext.''; $missingprev = ''. ''.$strprev.''; - } else { - $missingtarget = ''; - $missingnext = ''; - $missingprev = ''; } } else { - if ($value <> $value2 && $value2 <> '') { + // the string is translated in the pack being processed + if ($value <> $value2 && ($uselocal || $value2 <> '')) { $cellcolour = 'class="localdifferent"'; $usetabindex = true; - } else { - $cellcolour = ''; - $usetabindex = false; + $missingcounter++; + if (LANG_DISPLAY_MISSING_LINKS) { + $missingtarget = ''; + $missingnext = ''. + ''.$strnext.''; + $missingprev = ''. + ''.$strprev.''; + } } - $missingtarget = ''; - $missingnext = ''; - $missingprev = ''; } if ($editable) { -- 2.39.5