From 5764893508c36a5c9b64184e6a2c9ef0028aa0ef Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Fri, 2 Feb 2007 14:42:15 +0000 Subject: [PATCH] Produces better HTML/CSS output to fit into translators' screen. There are only two columns in the translation table form now. Odd and even rows' background alters. See MDL-8334 and http://moodle.org/mod/forum/discuss.php?d=62800 for more info about this. --- admin/lang.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/admin/lang.php b/admin/lang.php index ca9e9d6663..3da624d947 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -322,6 +322,7 @@ } print_box_end(); + print_heading("$strmissingstrings", "center", 4); // one-click way back print_box_start(); echo $strfilestoredin; @@ -387,13 +388,13 @@ echo "
"; echo '
'; } - echo ""; + echo "
"; $linescounter = 0; $missingcounter = 0; foreach ($enstring as $key => $envalue) { $linescounter++ ; if (LANG_SUBMIT_REPEAT && $editable && $linescounter % LANG_SUBMIT_REPEAT_EVERY == 0) { - echo ''; } @@ -402,9 +403,18 @@ $envalue = str_replace("%%","%",$envalue); $envalue = str_replace("\\","",$envalue); // Delete all slashes - echo "\n\n".''; - echo ''."\n"; - echo ''."\n"; + echo "\n\n".''; + echo ''."\n"; // Missing array keys are not bugs here but missing strings error_reporting(E_ALL ^ E_NOTICE); @@ -426,9 +436,9 @@ // green #AAFFAA - translation present in both system and local but is different if (!$value) { if (!$value2) { - $cellcolour = 'style="background-color: #ef6868"'; // TODO: replace by CSS class + $cellcolour = 'class="bothmissing"'; } else { - $cellcolour = 'style="background-color: #feff7f"'; // TODO: replace by CSS class + $cellcolour = 'class="mastermissing"'; } $missingcounter++; if (LANG_DISPLAY_MISSING_LINKS) { @@ -444,7 +454,7 @@ } } else { if ($value <> $value2 && $value2 <> '') { - $cellcolour = 'style="background-color: #AAFFAA"'; // TODO: replace by CSS class + $cellcolour = 'class="localdifferent"'; } else { $cellcolour = ''; } @@ -460,7 +470,7 @@ } else { $valuelen = strlen($envalue); } - $cols=50; + $cols=40; if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) { $rows = ceil($valuelen / $cols); echo ''."\n"; @@ -481,7 +491,7 @@ echo ''."\n"; } if ($editable) { - echo '
 
'; + echo '
 
'; echo ' '; echo '
 
'.$key.''.$envalue.'
'; + echo ''.$envalue.''; + echo '
'."\n"; + echo ''.$key.''; + echo '
 
'; + echo '
 
'; echo ''; echo ' '; echo ' '; -- 2.39.5