summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common.php5
-rw-r--r--edit.php8
2 files changed, 8 insertions, 5 deletions
diff --git a/common.php b/common.php
index 0d5bb11..9d18e5f 100644
--- a/common.php
+++ b/common.php
@@ -34,7 +34,7 @@ function languageinfo() {
return parse_ini_file('languages.ini', true);
}
-function parselangfile($filename) {
+function parselangfile($filename, $all = false) {
$lines = @file($filename);
if (!is_array($lines)) {
return false;
@@ -53,6 +53,9 @@ function parselangfile($filename) {
foreach($lines as $lineno => $line) {
$line = trim($line);
+ if ($all == true) {
+ $thisphrase['notes'][0] = "All fields are editable";
+ }
if (preg_match("/^### (.*)$/", $line, $matches)) {
if (strpos($matches[1], "The phrase is not used. Skipped") === false) {
$thisphrase['notes'][] = $matches[1];
diff --git a/edit.php b/edit.php
index 04c0460..cc5c118 100644
--- a/edit.php
+++ b/edit.php
@@ -21,7 +21,7 @@
error_reporting(E_ALL);
require_once('common.php');
-function edit($lang) {
+function edit($lang, $all = false) {
$languageinfo = languageinfo();
$LARGE_FLAGSIZE = LARGE_FLAGSIZE;
echo <<<END
@@ -46,8 +46,8 @@ translation as well.
<input type="hidden" name="lang" value="$lang" />
END;
- $phrases = parselangfile(sprintf("scratch/%s.lang.update", $lang));
- $english = parselangfile(sprintf("scratch/%s.lang.update", 'english'));
+ $phrases = parselangfile(sprintf("scratch/%s.lang.update", $lang), $all);
+ $english = parselangfile(sprintf("scratch/%s.lang.update", 'english'), $all);
if ($phrases === false || $english === false) {
printf("<strong>The file %s.lang doesn't exist, or something else went terribly wrong</strong>", $lang);
return false;
@@ -176,6 +176,6 @@ END;
}
print_head();
-edit($_REQUEST['lang']);
+edit($_REQUEST['lang'], $_REQUEST['all']);
print_foot();
?>