Alexandre Julliard : transl: Add support for displaying the translation status of the stable branch too .
Alexandre Julliard
julliard at winehq.org
Tue Jul 20 14:01:54 CDT 2010
Module: tools
Branch: master
Commit: 3bbc70a548e7c32e597bcec9e4e620835193945c
URL: http://source.winehq.org/git/tools.git/?a=commit;h=3bbc70a548e7c32e597bcec9e4e620835193945c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 20 20:32:31 2010 +0200
transl: Add support for displaying the translation status of the stable branch too.
---
transl/config.php | 4 +++-
transl/lib.php | 23 ++++++++++++++---------
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/transl/config.php b/transl/config.php
index c135273..e2c20ef 100644
--- a/transl/config.php
+++ b/transl/config.php
@@ -1,3 +1,5 @@
<?php
-$DATAROOT = "data";
+$branch = $_REQUEST['branch'];
+if ($branch != "stable") $branch = "master";
+$DATAROOT = $branch;
?>
diff --git a/transl/lib.php b/transl/lib.php
index 14da399..0e6c5e7 100644
--- a/transl/lib.php
+++ b/transl/lib.php
@@ -236,32 +236,37 @@ function update_lang_from_resfile($lang, $resfile)
function gen_lang_a($lang)
{
+ global $branch;
$extra = is_pedantic() ? "&pedantic=" : "";
- return "<a href=\"lang.php?lang=".urlencode($lang)."$extra\">";
+ return "<a href=\"lang.php?branch=$branch&lang=".urlencode($lang)."$extra\">";
}
function gen_resfile_a($lang, $resfile)
{
+ global $branch;
$extra = is_pedantic() ? "&pedantic=" : "";
- return "<a href=\"resfile.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."$extra\">";
+ return "<a href=\"resfile.php?branch=$branch&lang=".urlencode($lang)."&resfile=".urlencode($resfile)."$extra\">";
}
function gen_resource_a($lang, $resfile, $type, $id, $compare=FALSE)
{
+ global $branch;
$extra = ($compare) ? "&compare=" : "";
$extra .= is_pedantic() ? "&pedantic=" : "";
- return "<a href=\"resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile).
+ return "<a href=\"resource.php?branch=$branch&lang=".urlencode($lang)."&resfile=".urlencode($resfile).
"&type=".urlencode($type)."&id=".urlencode($id)."$extra\">";
}
function dump_menu_root($link = TRUE)
{
- $extra = is_pedantic() ? "?pedantic=" : "";
- if ($link)
- echo "<a href=\"index.php$extra\">";
- echo "Wine translations";
+ global $branch;
+ $extra = is_pedantic() ? "&pedantic=" : "";
if ($link)
- echo "</a>";
+ echo "<a href=\"index.php?branch=$branch$extra\">$branch</a>";
+ else if ($branch == "stable")
+ echo "<a href=\"index.php?branch=master$extra\">master</a> | stable";
+ else
+ echo "master | <a href=\"index.php?branch=stable$extra\">stable</a>";
if (strpos($_SERVER['PHP_SELF'], "index.php"))
{
@@ -319,7 +324,7 @@ function dump_menu_resource($lang, $resfile, $type, $id)
function dump_pedantic($url, $highest_level = FALSE)
{
- echo "<a style=\"float: right; margin-top: -13px;\" href=\"".$url;
+ echo "<a style=\"float: right;\" href=\"".$url;
if (is_pedantic())
{
echo "\" title=\"'Normal' mode will only show errors.\"";
More information about the wine-cvs
mailing list