From e3305cc5d921ac8dfdd4030707a9dbe5cbb63e53 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 12 Dec 2002 03:33:12 +0000 Subject: [PATCH] Better checks when comparing languages. Now highlights missing or empty strings. Quick check mode also flags strings when they exist but are empty. Larger form space to edit empty strings. --- admin/lang.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/admin/lang.php b/admin/lang.php index e2626056b1..ccdfd2ec04 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -86,7 +86,7 @@ $first = true; foreach ($enstring as $key => $value) { - if (!isset($string[$key])) { + if (!isset($string[$key]) or $string[$key] == "") { $value = htmlspecialchars($value); $value = str_replace("$"."a", "\\$"."a", $value); if ($first) { @@ -189,8 +189,11 @@ $value = str_replace("\\","",$string[$key]); // Delete all slashes $value = htmlspecialchars($value); + + $cellcolour = $value ? $THEME->cellcontent: $THEME->highlight; + if ($editable) { - echo ""; + echo ""; if (isset($string[$key])) { $valuelen = strlen($value); } else { @@ -201,17 +204,15 @@ $rows = ceil($valuelen / $cols); echo ""; } else { - $cols = $valuelen + 2; + if ($valuelen) { + $cols = $valuelen + 2; + } echo ""; } echo ""; } else { - if (isset($string[$key])) { - echo "$value"; - } else { - echo "-"; - } + echo "$value"; } } if ($editable) { -- 2.39.5