>From 225d8c0d1ac08c6b78c9c5141d96ef6050b982e7 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Fri, 14 Aug 2009 16:25:44 +0200 Subject: [PATCH] Add the possibility to switch between 'Normal' and 'Pedantic' --- transl/index.php | 9 +++++---- transl/lib.php | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/transl/index.php b/transl/index.php index 3249265..66071ad 100644 --- a/transl/index.php +++ b/transl/index.php @@ -40,10 +40,11 @@ while ($line = fgets($summary, 1024))

This page shows the state of the translations of Wine. -Note that some resources marked as translated may be in fact in English - sometimes developers -add new English resources into every language file. This automatic tool doesn't detect this - -it needs to be found manually by the translators. If you would like to read about how to -improve Wine translations check . +Note that some resources marked as translated may in fact still be English. Sometimes developers +add new English resources into every language file. This automatic tool has a 'Pedantic' mode that +detects most of these but currently has a lot of false positives. If you would like to read about +how to improve Wine translations check +.

diff --git a/transl/lib.php b/transl/lib.php index 11f3d52..aceee55 100644 --- a/transl/lib.php +++ b/transl/lib.php @@ -262,6 +262,12 @@ function dump_menu_root($link = TRUE) echo "Wine translations"; if ($link) echo ""; + + if (strpos($_SERVER['PHP_SELF'], "index.php")) + { + $url = "index.php"; + dump_pedantic($url, TRUE); + } } function dump_menu_lang($lang, $link = TRUE) @@ -274,6 +280,12 @@ function dump_menu_lang($lang, $link = TRUE) echo get_lang_name($lang); if ($link) echo ""; + + if (strpos($_SERVER['PHP_SELF'], "lang.php")) + { + $url = "lang.php?lang=".urlencode($lang); + dump_pedantic($url, FALSE); + } } function dump_menu_resfile($lang, $resfile, $link = TRUE) @@ -286,6 +298,12 @@ function dump_menu_resfile($lang, $resfile, $link = TRUE) echo get_resfile_name($resfile); if ($link) echo ""; + + if (strpos($_SERVER['PHP_SELF'], "resfile.php")) + { + $url = "resfile.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile); + dump_pedantic($url, FALSE); + } } function dump_menu_resource($lang, $resfile, $type, $id) @@ -294,6 +312,28 @@ function dump_menu_resource($lang, $resfile, $type, $id) echo " > "; echo get_resource_name($type, $id); + + $url = "resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."&type=".urlencode($type)."&id=".urlencode($id); + dump_pedantic($url, FALSE); +} + +function dump_pedantic($url, $highest_level = FALSE) +{ + echo "Switch to 'Normal' mode"; + } + else + { + if ($highest_level) + echo "?pedantic=\""; + else + echo "&pedantic=\""; + echo "title=\"'Pedantic' mode will show more potential translation issues.\""; + echo ">Switch to 'Pedantic' mode"; + } } ?> -- 1.6.0.6