Permalink
Browse files

Fix for bug 1608:

When editing the language, you can easily switch between the two views with a button.

Also fixes in the HTML generation.
  • Loading branch information...
1 parent e3af1b0 commit d2b12fefd5d100c3e813aa2d49376ec726580d25 defacer committed Jul 2, 2004
Showing with 15 additions and 4 deletions.
  1. +15 −4 admin/lang.php
View
@@ -27,22 +27,30 @@
case "missing":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strmissingstrings";
$title = $strmissingstrings;
+ $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
+ '<input type="hidden" name="mode" value="compare" />'.
+ '<input type="submit" value="'.$strcomparelanguage.'" /></form>';
break;
case "compare":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strcomparelanguage";
$title = $strcomparelanguage;
+ $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
+ '<input type="hidden" name="mode" value="missing" />'.
+ '<input type="submit" value="'.$strmissingstrings.'" /></form>';
break;
default:
$title = $strlanguage;
$navigation = $strlanguage;
+ $button = '';
break;
}
$currentlang = current_language();
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
- "<a href=\"configure.php\">$strconfiguration</a> -> $navigation");
+ "<a href=\"configure.php\">$strconfiguration</a> -> $navigation",
+ '', '', true, $button);
if (!$mode) {
$currlang = current_language();
@@ -102,15 +110,18 @@
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);
if ($first) {
- echo "</PRE><HR><P><B>".get_string("stringsnotset","","$langdir/$file")."</B></P><PRE>";
+ echo "<p><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
$first = false;
$somethingfound = true;
}
- echo "$"."string['$key'] = \"$value\";<BR>";
+ echo "$"."string['$key'] = \"$value\";<br />";
}
}
+ if (!$first) {
+ echo '</pre><hr />';
+ }
}
-
+
if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) {
error("Could not find English language help files!");
}

0 comments on commit d2b12fe

Please sign in to comment.