Mikolaj Zalewski : add links to the Wiki

Alexandre Julliard julliard at winehq.org
Fri Jun 19 08:36:19 CDT 2009


Module: tools
Branch: master
Commit: 540debc9c088f3f5dce667e2b47c23cbe5a063cb
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=540debc9c088f3f5dce667e2b47c23cbe5a063cb

Author: Mikolaj Zalewski <mikolajz at tygrys.dom>
Date:   Sat Mar  1 23:37:53 2008 +0100

add links to the Wiki

---

 php/index.php   |    9 +++++++++
 php/lib.php     |    2 ++
 php/resfile.php |   12 ++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/php/index.php b/php/index.php
index bb98636..e9beaba 100644
--- a/php/index.php
+++ b/php/index.php
@@ -21,6 +21,15 @@ while ($line = fgets($summary, 1024))
 ?>
 <html>
 <h1>Wine translation statistics</h1>
+
+<p>This page shows the state of the translations of <a href="http://www.winehq.org/">Wine</a>.
+Note that some resources marked as translated may be in fact in English - sometimes developers
+adds new English resources into every language file. This automatic tool doesn't detect this -
+this needs to be found manually by the translators. If you want to read about how to translate
+Wine or just want to know why adding English stringtable strings into every language file is
+recommended check <?php echo $WINE_WIKI_TRANSLATIONS ?>.
+</p>
+
 <table border="1">
 <tr><th></th><th>Language</th><th>Translated</th><th>Missing</th><th>Errors</th><th>&nbsp;</th></tr>
 <?php
diff --git a/php/lib.php b/php/lib.php
index e4e0e56..336b935 100644
--- a/php/lib.php
+++ b/php/lib.php
@@ -4,6 +4,8 @@ $MASTER_LANGUAGE = "009:01";
 $MASTER_LANGUAGE_BINID = 1033;
 $MASTER_LANGUAGE_NAME = "English (US)";
 
+$WINE_WIKI_TRANSLATIONS = "<a href=\"TODO\">[TODO: Wiki translations page]</a>";
+
 function validate_lang($id)
 {
     global $DATAROOT;
diff --git a/php/resfile.php b/php/resfile.php
index 341a556..0ed577d 100644
--- a/php/resfile.php
+++ b/php/resfile.php
@@ -22,6 +22,18 @@ while ($line = fgets($file, 4096))
     }
 }
 
+if (count($msgs) == 0) {
+    echo "<p>This file is not translated into ".get_lang_name($lang).".</p>\n";
+    echo "<ul><li>If you want to see what resources are in this file, check the "
+            .gen_resfile_a($MASTER_LANGUAGE, $resfile)."English (US) version</a>"
+            ." of this file</li>\n";
+    echo "<li>If you want to translate this file you should check the $resfile\n";
+    echo "file in the Wine source tree and make it include a new language file for\n";
+    echo get_lang_name($lang)." (see $WINE_WIKI_TRANSLATIONS for a guide to\n";
+    echo "translating)</li>";
+    exit();
+}
+
 echo "<table>\n";
 sort($msgs);
 foreach ($msgs as $value)




More information about the wine-cvs mailing list