com web/doc: Comunicates are more descriptive: scripts/rev.php www/revcheck.php

[email protected]
Newsgroups php.doc.web
Message-ID <[email protected]>
Commit:    308eefcfa33ae20ab5a35fa119eb9f73486f1e3f
Author:    Sobak <[email protected]>         Sat, 29 Mar 2014 06:43:07 +0100
Parents:   f61296f6b69b22785a96612bb9e0fb89a632e18a
Branches:  master

Link:       http://git.php.net/?p=web/doc.git;a=commitdiff;h=308eefcfa33ae20ab5a35fa119eb9f73486f1e3f

Log:
Comunicates are more descriptive

Changed paths:
  M  scripts/rev.php
  M  www/revcheck.php


Diff:
diff --git a/scripts/rev.php b/scripts/rev.php
index 182df0e..9bd65c5 100644
--- a/scripts/rev.php
+++ b/scripts/rev.php
@@ -108,14 +108,14 @@ SQL;
 
 function parse_translation($lang)
 {
-    global $SQL_BUFF, $DOCS;
+    global $SQL_BUFF, $DOCS, $LANGUAGES;
     echo "Parsing intro..\n";
 
     // Path to find translation.xml file, set default values,
     // in case we can't find the translation file
     $translation_xml = $DOCS . $lang . "/translation.xml";
 
-    $intro = "No intro available for the $lang translation of the manual";
+    $intro = "No intro available for the {$LANGUAGES[$lang]} translation of the manual.";
     $charset  = 'iso-8859-1';
 
     if (file_exists($translation_xml)) {
diff --git a/www/revcheck.php b/www/revcheck.php
index 5920bc1..2fa104f 100644
--- a/www/revcheck.php
+++ b/www/revcheck.php
@@ -48,7 +48,7 @@ switch($tool) {
 		$translators = get_translators($dbhandle, $lang);
 
 		if (empty($translators)) {
-			echo '<p>No translators info.</p>';
+			echo '<p>Error: no translators info found in database.</p>';
 		}
 		else {
 			$uptodate = translator_get_uptodate($dbhandle, $lang);
@@ -105,7 +105,7 @@ TRANSLATORS_HEAD;
 	case 'missfiles':
 		$missfiles = get_missfiles($dbhandle, $lang);
 		if (!$missfiles) {
-			echo '<p>No missfile info.</p>';
+			echo '<p>All files translated? Would be nice... but it\'s probably an error :(</p>';
 		}
 		else {
 			$num = count($missfiles);
@@ -135,7 +135,7 @@ TRANSLATORS_HEAD;
 	case 'oldfiles':
 		$oldfiles = get_oldfiles($dbhandle, $lang);
 		if (!$oldfiles) {
-			echo '<p>No old files info.</p>';
+			echo '<p>Good, it seems that this translation doesn\'t contain any file which is not present in English tree.</p>';
 		}
 		else {
 			$num = count($oldfiles);
@@ -166,7 +166,7 @@ TRANSLATORS_HEAD;
 		$misstags = get_misstags($dbhandle, $lang);
 		$num = count($misstags);
 		if (!$num) {
-			echo 'No misstags info';
+			echo '<p>Good, all files contain revision comments.</p>';
 		}
 		else {
 			echo '<table border="0" cellpadding="3" cellspacing="1" style="text-align:center">';
@@ -252,7 +252,7 @@ TRANSLATORS_HEAD;
 		$users = get_translators($dbhandle, $lang);
 
 		if (empty($dirs)) {
-			echo '<p>No files</p>';
+			echo '<p>Error: no directories found in database.</p>';
 		}
 		else {
 			echo '<p>This tool allows you to check which files in your translation need update. To show the list ';
@@ -302,7 +302,7 @@ TRANSLATORS_HEAD;
 				$outdated = get_outdated_files($dbhandle, $lang, $_GET['dir']);
 			}
 			if (empty($outdated)) {
-				echo '<p>No files info</p>';
+				echo '<p>Good, it seems that all files are up to date for these conditions.</p>';
 			}
 			else {
 				echo <<<END_OF_MULTILINE
@@ -381,7 +381,11 @@ END_OF_MULTILINE;
 			site_footer($sidebar);
 		}
 		else {
-			echo '<p>Please choose a specified tool from the right side.</p>';
+			$intro_result = $dbhandle->query("SELECT intro FROM description WHERE lang = '$lang'");
+			$intro = $intro_result->fetchArray();
+			echo '<h2>Intro for language</h2>';
+			echo '<p>'.$intro[0].'</p>';
+			echo '<p>Links to available tools are placed on the right sidebar.</p>';
 		}
 	break;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.