winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
5 participants
1115 discussions
Start a n
N
ew thread
Mikolaj Zalewski : treat locale data as a different category
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: f3ee71f15722ab4c6b7b457cf07859585a312d18 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=f3ee71f15722ab4c6b7b457c…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Tue Feb 19 18:44:43 2008 +0100 treat locale data as a different category --- php/lang.php | 15 +++++-- php/lib.php | 14 ++++-- php/resfile.php | 2 +- php/resource.php | 3 +- scripts/Master.sh | 4 +- scripts/checkmakefile.pl | 18 ++++++++- scripts/conf/007:01 | 1 - scripts/conf/00a:01 | 1 - scripts/conf/00c:01 | 1 - scripts/conf/00e:00 | 2 +- scripts/conf/00e:01 | 1 - scripts/conf/010:01 | 1 - scripts/conf/013:01 | 1 - scripts/summary.pl | 14 +++--- scripts/ver.pl | 97 ++++++++++++++++++++++++++++----------------- 15 files changed, 108 insertions(+), 67 deletions(-) Diff:
http://source.winehq.org/git/tools.git/?a=commitdiff;h=f3ee71f15722ab4c6b7b…
1
0
0
0
Mikolaj Zalewski : add an [ignore-sublang] instead of collapse to show that the sublang code should be ignored
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 9210ef461e6275dc4bac11855c0d867d9ada4561 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=9210ef461e6275dc4bac1185…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Tue Feb 19 14:52:20 2008 +0100 add an [ignore-sublang] instead of collapse to show that the sublang code should be ignored --- php/index.php | 9 +++++---- php/lib.php | 25 +++++++++++++++++++++---- scripts/conf/005:00 | 2 +- scripts/conf/005:01 | 1 - scripts/conf/011:00 | 2 +- scripts/conf/011:01 | 1 - scripts/conf/012:00 | 2 +- scripts/conf/012:01 | 1 - scripts/conf/018:00 | 2 +- scripts/conf/018:01 | 1 - scripts/conf/019:00 | 2 +- scripts/conf/019:01 | 1 - scripts/conf/01b:00 | 2 +- scripts/conf/01b:01 | 1 - scripts/conf/024:00 | 2 +- scripts/conf/024:01 | 1 - scripts/conf/08f:00 | 2 +- scripts/conf/08f:01 | 1 - scripts/ver.pl | 20 +++++++++++++++----- 19 files changed, 49 insertions(+), 29 deletions(-) diff --git a/php/index.php b/php/index.php index a8c7ce5..05e2693 100644 --- a/php/index.php +++ b/php/index.php @@ -1,5 +1,6 @@ <?php include_once("config.php"); +include_once("lib.php"); $summary = fopen("$DATAROOT/langs/summary", "r"); while ($line = fgets($summary, 1024)) @@ -8,10 +9,10 @@ while ($line = fgets($summary, 1024)) { die("couldn't parse line $line"); } - - $names[$m[1]] = file_get_contents("$DATAROOT/conf/".$m[1]); - if (strpos($names[$m[1]], "[hide]")) + + if (has_lang_flag($m[1], "hide")) continue; + $sum = $m[2]+0; $transl[$m[1]] = $m[3]; $missing[$m[1]] = $m[4]; @@ -62,7 +63,7 @@ for ($i = 0; $i < count($transl); $i++) echo "<td rowspan=\"$serial\" style=\"text-align: center\">$nr"; echo "</td>"; } - echo "<td><a href=\"lang.php?lang=$langid\">".$names[$langid]."</a></td>"; + echo "<td><a href=\"lang.php?lang=$langid\">".get_lang_name($langid)."</a></td>"; printf("<td>%d (%.1f%%)</td>", $value, ($value*100)/$sum); echo "<td>".$missing[$langid]."</td><td>".$errors[$langid]."</td>\n"; draw_bar($value, $errors[$langid], $sum); diff --git a/php/lib.php b/php/lib.php index 3a51a90..1e90fc9 100644 --- a/php/lib.php +++ b/php/lib.php @@ -35,18 +35,35 @@ function validate_id($id) return $id; } +function get_raw_lang_name($id) +{ + static $lang_cache = array(); + if (empty($lang_cache[$id])) + { + global $DATAROOT; + + $name = file_get_contents("$DATAROOT/conf/$id"); + $lang_cache[$id] = $name; + } + return $lang_cache[$id]; +} + function get_lang_name($id) { - global $DATAROOT; + return preg_replace("/\[ignore-sublang\]/", "", get_raw_lang_name($id)); +} - return file_get_contents("$DATAROOT/conf/$id"); +function has_lang_flag($id, $flag) +{ + return is_int(strpos(get_raw_lang_name($id), "[".$flag."]")); } function is_lang_ignore_sublang($lang) { - if (!preg_match("/([0-9a-f]{3}):00/", $lang, $m)) + return has_lang_flag($lang, "ignore-sublang"); +/* if (!preg_match("/([0-9a-f]{3}):00/", $lang, $m)) return FALSE; - return (get_lang_name($m[1].":01") == "collapse"); + return (get_lang_name($m[1].":01") == "collapse");*/ } function get_lang_binid($lang) diff --git a/scripts/conf/005:00 b/scripts/conf/005:00 index 15af5de..ba26bf3 100644 --- a/scripts/conf/005:00 +++ b/scripts/conf/005:00 @@ -1 +1 @@ -Czech \ No newline at end of file +Czech[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/005:01 b/scripts/conf/005:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/005:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/011:00 b/scripts/conf/011:00 index dc09008..7123dbe 100644 --- a/scripts/conf/011:00 +++ b/scripts/conf/011:00 @@ -1 +1 @@ -Japanese \ No newline at end of file +Japanese[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/011:01 b/scripts/conf/011:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/011:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/012:00 b/scripts/conf/012:00 index 3120cac..060827f 100644 --- a/scripts/conf/012:00 +++ b/scripts/conf/012:00 @@ -1 +1 @@ -Korean \ No newline at end of file +Korean[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/012:01 b/scripts/conf/012:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/012:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/018:00 b/scripts/conf/018:00 index a6e3586..8258690 100644 --- a/scripts/conf/018:00 +++ b/scripts/conf/018:00 @@ -1 +1 @@ -Romanian \ No newline at end of file +Romanian[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/018:01 b/scripts/conf/018:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/018:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/019:00 b/scripts/conf/019:00 index 9814eb5..74ecec6 100644 --- a/scripts/conf/019:00 +++ b/scripts/conf/019:00 @@ -1 +1 @@ -Russian \ No newline at end of file +Russian[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/019:01 b/scripts/conf/019:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/019:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/01b:00 b/scripts/conf/01b:00 index 18f74a2..399b1c9 100644 --- a/scripts/conf/01b:00 +++ b/scripts/conf/01b:00 @@ -1 +1 @@ -Slovak \ No newline at end of file +Slovak[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/01b:01 b/scripts/conf/01b:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/01b:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/024:00 b/scripts/conf/024:00 index 94a81b9..fde8a50 100644 --- a/scripts/conf/024:00 +++ b/scripts/conf/024:00 @@ -1 +1 @@ -Slovenian \ No newline at end of file +Slovenian[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/024:01 b/scripts/conf/024:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/024:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/conf/08f:00 b/scripts/conf/08f:00 index f13fe40..8c90610 100644 --- a/scripts/conf/08f:00 +++ b/scripts/conf/08f:00 @@ -1 +1 @@ -Esperanto \ No newline at end of file +Esperanto[ignore-sublang] \ No newline at end of file diff --git a/scripts/conf/08f:01 b/scripts/conf/08f:01 deleted file mode 100644 index f55031a..0000000 --- a/scripts/conf/08f:01 +++ /dev/null @@ -1 +0,0 @@ -collapse \ No newline at end of file diff --git a/scripts/ver.pl b/scripts/ver.pl index 26ac823..6b62cdb 100755 --- a/scripts/ver.pl +++ b/scripts/ver.pl @@ -48,20 +48,30 @@ sub resource_name2 { sub collapse { my($name) = shift @_; + $base_name = $name; + $base_name =~ s/:[0-9a-f][0-9a-f]/:00/; if (not exists $tab_should_collapse{$name}) { - open(NAMEFILE, "<conf/$name"); + open(NAMEFILE, "<conf/$base_name"); $content = <NAMEFILE>; - if ($content eq "collapse") { + close(NAMEFILE); + if ($content =~ /\[ignore-sublang\]/) { $tab_should_collapse{$name} = TRUE; } else { - $tab_should_collapse{$name} = FALSE; + open(NAMEFILE, "<conf/$name"); + $content = <NAMEFILE>; + if ($content eq "collapse") { + $tab_should_collapse{$name} = TRUE; + } else { + $tab_should_collapse{$name} = FALSE; + } + close(NAMEFILE); } - close(NAMEFILE); + } if ($tab_should_collapse{$name} eq TRUE) { - $name =~ s/:[0-9a-f][0-9a-f]/:00/; + $name = $base_name; } return $name; }
1
0
0
0
Mikolaj Zalewski : show at least one pixel of red if there are errors in translation
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: bc16e8b3bb076a3c9a5c9e635f07429039e9c488 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=bc16e8b3bb076a3c9a5c9e63…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Mon Feb 18 17:07:54 2008 +0100 show at least one pixel of red if there are errors in translation --- php/index.php | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/php/index.php b/php/index.php index 59a6fab..a8c7ce5 100644 --- a/php/index.php +++ b/php/index.php @@ -25,8 +25,14 @@ while ($line = fgets($summary, 1024)) <?php function draw_bar($tr, $err, $sum) { - $tr_len = ($tr*300)/$sum; - $err_len = ($err*300)/$sum; + $tr_len = floor(($tr*300)/$sum); + $err_len = floor(($err*300)/$sum); + if ($err_len == 0 && $err > 0) + { + $err_len++; + if ($tr_len > 1) + $tr_len--; + } $miss_len = 300 - $tr_len - $err_len; echo '<td style="background-color: #D1DAF9">'; echo "<img src=\"img/bar0.gif\" height=\"15\" width=\"$tr_len\">";
1
0
0
0
Mikolaj Zalewski : dump the stringtables from the *.res files
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 54d227d19193163c275cb1ff04217fdf36768d8c URL:
http://source.winehq.org/git/tools.git/?a=commit;h=54d227d19193163c275cb1ff…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Mon Feb 18 17:07:07 2008 +0100 dump the stringtables from the *.res files --- php/lib.php | 24 ++++++++ php/lib_res.php | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ php/resource.php | 106 +++++++++++++++++------------------- 3 files changed, 232 insertions(+), 57 deletions(-) Diff:
http://source.winehq.org/git/tools.git/?a=commitdiff;h=54d227d19193163c275c…
1
0
0
0
Mikolaj Zalewski : scripts: store the *.res dumps in dumps/res/
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 1172270a0011df6ae5c3984d2bab90dd82bf9931 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=1172270a0011df6ae5c3984d…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Mon Feb 18 15:02:57 2008 +0100 scripts: store the *.res dumps in dumps/res/ --- scripts/Master.sh | 1 + scripts/checkmakefile.pl | 13 +++++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/scripts/Master.sh b/scripts/Master.sh index addb75a..451b844 100755 --- a/scripts/Master.sh +++ b/scripts/Master.sh @@ -41,6 +41,7 @@ rm -Rf $WORKDIR/dumps rm -Rf $WORKDIR/new-langs mkdir $WORKDIR/langs mkdir $WORKDIR/dumps +mkdir $WORKDIR/dumps/res mkdir $WORKDIR/new-langs # Analyze all the Makefiles diff --git a/scripts/checkmakefile.pl b/scripts/checkmakefile.pl index 447299d..ee441aa 100755 --- a/scripts/checkmakefile.pl +++ b/scripts/checkmakefile.pl @@ -9,6 +9,11 @@ sub mycheck { my($name) = shift(@_); + if ($name =~ m/version.rc$/) { + print "--- Ignoring ".$name."\n" unless (exists $ENV{"NOVERBOSE"}); + return; + } + if (not exists $ENV{"NOVERBOSE"}) { print "*** ".$name."\n"; } @@ -24,6 +29,14 @@ sub mycheck { $name =~ s,$winedir,,; system("./ver.pl \"$name\" \"$workdir\" <$workdir/ver.txt"); + $norm_fn= $name; + $norm_fn =~ s/\.rc$//; + $norm_fn =~ s/[^a-zA-Z0-9]/-/g; + $ret = system("$wrc -I$winedir/include -I$winedir/dlls/user32 $defs $winedir$name $workdir/dumps/res/$norm_fn.res 2>>$workdir/run.log >/dev/null"); + if ($ret != 0) + { + print "!!!!!!! 2nd pass return value: ".$ret."\n"; + } } else {
1
0
0
0
Mikolaj Zalewski : compatibility fix for old PHP
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 8349cca4be1a4ae4d2bcf8dbe266583e96415a74 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=8349cca4be1a4ae4d2bcf8db…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Wed Feb 13 21:37:24 2008 +0100 compatibility fix for old PHP --- php/resfile.php | 2 +- php/resource.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php/resfile.php b/php/resfile.php index cff3948..1c2129d 100644 --- a/php/resfile.php +++ b/php/resfile.php @@ -51,7 +51,7 @@ foreach ($msgs as $value) else { if (strpos($value, "Error: ") === 0) - $extra = "&compare"; + $extra = "&compare="; else $extra = ""; $value = preg_replace("/STRINGTABLE ([0-9]+)/", diff --git a/php/resource.php b/php/resource.php index 0783ff1..5e74aa5 100644 --- a/php/resource.php +++ b/php/resource.php @@ -23,7 +23,7 @@ $msgs = array(); if (!$compare) { echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"2\" style=\"text-align: right\">"; - echo "<small><a href=\"resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."&type=".urlencode($type)."&id=".urlencode($id)."&compare\">"; + echo "<small><a href=\"resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."&type=".urlencode($type)."&id=".urlencode($id)."&compare=\">"; echo "Compare with ".get_lang_name($MASTER_LANGUAGE)." >></a></small>"; echo "</td></tr>"; }
1
0
0
0
Mikolaj Zalewski : add option to compare stringtables
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 8583aa5ba38bc760408b49248f36b75d905445d8 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=8583aa5ba38bc760408b4924…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Wed Feb 13 21:22:33 2008 +0100 add option to compare stringtables --- php/resfile.php | 6 ++++- php/resource.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/php/resfile.php b/php/resfile.php index facf721..cff3948 100644 --- a/php/resfile.php +++ b/php/resfile.php @@ -50,8 +50,12 @@ foreach ($msgs as $value) } else { + if (strpos($value, "Error: ") === 0) + $extra = "&compare"; + else + $extra = ""; $value = preg_replace("/STRINGTABLE ([0-9]+)/", - "<a href=\"resource.php?lang=$lang&resfile=$resfile&type=6&id=".$m[1]."\">". + "<a href=\"resource.php?lang=$lang&resfile=$resfile&type=6&id=".$m[1]."$extra\">". "STRINGTABLE #".$m[1]." (strings $id0..$id1)</a>", $value); } diff --git a/php/resource.php b/php/resource.php index 2d9602d..0783ff1 100644 --- a/php/resource.php +++ b/php/resource.php @@ -6,6 +6,7 @@ $lang = validate_lang($_REQUEST['lang']); $resfile = validate_resfile($_REQUEST['resfile']); $type = validate_type($_REQUEST['type']); $id = validate_id($_REQUEST['id']); +$compare = isset($_REQUEST['compare']); $norm_fn = preg_replace("/[^A-Za-z0-9]/", "-", $resfile); $file = fopen("$DATAROOT/dumps/$norm_fn/$lang-$type-$id", "r"); @@ -15,9 +16,31 @@ $msgs = array(); <body> <h1>File <?php echo $resfile?> - <?php echo get_lang_name($lang) ?> language - Resource <?php echo "$id ($type)"?></h1> -<table style="background-color: #f8f8ff"> -<tr style="background-color: #f0f0ff"><th colspan="2">String table #<?php echo $id?></th></tr> +<table style="background-color: #f0f0ff"> +<tr style="background-color: #e0e0ff"><th colspan="3">String table #<?php echo $id?></th></tr> <?php + +if (!$compare) +{ + echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"2\" style=\"text-align: right\">"; + echo "<small><a href=\"resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."&type=".urlencode($type)."&id=".urlencode($id)."&compare\">"; + echo "Compare with ".get_lang_name($MASTER_LANGUAGE)." >></a></small>"; + echo "</td></tr>"; +} +else +{ + $master_file = fopen("$DATAROOT/dumps/$norm_fn/$MASTER_LANGUAGE-$type-$id", "r"); + $master_content = fgets($master_file, 262144); + fclose($master_file); + + echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"3\" style=\"text-align: right\">"; + echo "<small><a href=\"resource.php?lang=".urlencode($lang)."&resfile=".urlencode($resfile)."&type=".urlencode($type)."&id=".urlencode($id)."\">"; + echo "<< Hide compare with ".get_lang_name($MASTER_LANGUAGE)."</a></small>"; + echo "</td></tr>"; + + echo "<tr style=\"background-color: #e8e8ff\"><td>id</td><td>".get_lang_name($lang)."</td><td>".get_lang_name($MASTER_LANGUAGE)."</td></tr>\""; +} + $content = fgets($file, 262144); function get_hex(&$content) @@ -32,9 +55,19 @@ function get_hex(&$content) } for ($i=0; $i<16; $i++) { - echo "<tr><td valign=\"top\">".(($id-1)*16+$i)."</td>"; - echo "<td>"; + $extra = ""; + $left = hexdec(get_hex($content)); + if ($compare) + { + $master_left = hexdec(get_hex($master_content)); + if ((!$master_left && $left) || ($master_left && !$left)) + $extra = " style=\"background-color: #ffb8d0\""; + } + + echo "<tr$extra><td valign=\"top\">".(($id-1)*16+$i)."</td>"; + echo "<td>"; + if ($left == 0) { echo "<i style=\"color: #7f7fff\">empty</i>"; @@ -50,6 +83,27 @@ for ($i=0; $i<16; $i++) { } echo ""\n"; } + + if ($compare) + { + echo "</td><td>"; + $left = $master_left; + if ($left == 0) + { + echo "<i style=\"color: #7f7fff\">empty</i>"; + } + else + { + echo """; + while ($left > 0) + { + $hex = get_hex($master_content); + echo "&#x".$hex.";"; + $left--; + } + echo ""\n"; + } + } echo "</td></tr>\n"; } ?>
1
0
0
0
Mikolaj Zalewski : validate input data
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: f2025b7ccbc06e57180926c337b2ac82a42c741d URL:
http://source.winehq.org/git/tools.git/?a=commit;h=f2025b7ccbc06e57180926c3…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Wed Feb 13 20:06:21 2008 +0100 validate input data --- php/lib.php | 21 +++++++++++++++++++++ php/resfile.php | 2 +- php/resource.php | 6 +++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/php/lib.php b/php/lib.php index e5e68b7..8b6a95e 100644 --- a/php/lib.php +++ b/php/lib.php @@ -12,6 +12,27 @@ function validate_lang($id) return $lang; } +function validate_type($type) +{ + if (!preg_match("/^[0-9]+$/", $type)) + die("Invalid type"); + return $type; +} + +function validate_resfile($resfile) +{ + if (!preg_match("*^[a-zA-Z0-9/.-_]+$*", $resfile)) + die("Invalid resource file"); + return $resfile; +} + +function validate_id($id) +{ + if (!preg_match("/^[a-zA-Z0-9_]+$/", $id)) + die("Invalid resource file"); + return $id; +} + function get_lang_name($id) { global $DATAROOT; diff --git a/php/resfile.php b/php/resfile.php index 6685c50..facf721 100644 --- a/php/resfile.php +++ b/php/resfile.php @@ -3,7 +3,7 @@ include("config.php"); include("lib.php"); $lang = validate_lang($_REQUEST['lang']); -$resfile = $_REQUEST['resfile']; +$resfile = validate_resfile($_REQUEST['resfile']); $file = fopen("$DATAROOT/langs/$lang", "r"); $msgs = array(); diff --git a/php/resource.php b/php/resource.php index 5c7cbba..2d9602d 100644 --- a/php/resource.php +++ b/php/resource.php @@ -3,9 +3,9 @@ include("config.php"); include("lib.php"); $lang = validate_lang($_REQUEST['lang']); -$resfile = $_REQUEST['resfile']; -$type = $_REQUEST['type']; -$id = $_REQUEST['id']; +$resfile = validate_resfile($_REQUEST['resfile']); +$type = validate_type($_REQUEST['type']); +$id = validate_id($_REQUEST['id']); $norm_fn = preg_replace("/[^A-Za-z0-9]/", "-", $resfile); $file = fopen("$DATAROOT/dumps/$norm_fn/$lang-$type-$id", "r");
1
0
0
0
Mikolaj Zalewski : refactor some common functions
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 51d572561e614d94f59c9181ac9064d66dea4d21 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=51d572561e614d94f59c9181…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Wed Feb 13 19:02:45 2008 +0100 refactor some common functions --- php/lang.php | 11 +++++------ php/lib.php | 22 ++++++++++++++++++++++ php/resfile.php | 7 +++---- php/resource.php | 7 +++---- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/php/lang.php b/php/lang.php index ab0394f..c16aab7 100644 --- a/php/lang.php +++ b/php/lang.php @@ -1,10 +1,9 @@ <?php include_once("config.php") ; +include_once("lib.php"); + +$lang = validate_lang($_REQUEST['lang']); -$lang = preg_replace("/[^0-9a-f:]/", "-", $_REQUEST['lang']); -if (!file_exists("$DATAROOT/langs/$lang")) - die("Invalid lang parameter"); - $file = fopen("$DATAROOT/langs/$lang", "r"); $transl = array(); $notransl = array(); @@ -56,7 +55,7 @@ function dump_table($table) } ?> -<h1><?php echo "Language: ".file_get_contents("$DATAROOT/conf/$lang") ?></h1> +<h1><?php echo "Language: ".get_lang_name($lang) ?></h1> <h2>Partialy translanted files</h2> <?php dump_table($partial) ?> @@ -66,4 +65,4 @@ function dump_table($table) <h2>Fully translated files</h2> <?php dump_table($transl) ?> -</html> \ No newline at end of file +</html> diff --git a/php/lib.php b/php/lib.php new file mode 100644 index 0000000..e5e68b7 --- /dev/null +++ b/php/lib.php @@ -0,0 +1,22 @@ +<?php + +$MASTER_LANGUAGE = "009:01"; + +function validate_lang($id) +{ + global $DATAROOT; + + $lang = preg_replace("/[^0-9a-f:]/", "-", $_REQUEST['lang']); + if (!file_exists("$DATAROOT/conf/$lang") || !file_exists("$DATAROOT/langs/$lang")) + die("Invalid lang parameter"); + return $lang; +} + +function get_lang_name($id) +{ + global $DATAROOT; + + return file_get_contents("$DATAROOT/conf/$id"); +} + +?> diff --git a/php/resfile.php b/php/resfile.php index 35f693f..6685c50 100644 --- a/php/resfile.php +++ b/php/resfile.php @@ -1,16 +1,15 @@ <?php include("config.php"); +include("lib.php"); -$lang = preg_replace("/[^0-9a-f:]/", "-", $_REQUEST['lang']); +$lang = validate_lang($_REQUEST['lang']); $resfile = $_REQUEST['resfile']; -if (!file_exists("$DATAROOT/langs/$lang")) - die("Invalid lang parameter"); $file = fopen("$DATAROOT/langs/$lang", "r"); $msgs = array(); ?> <html> -<h1>File <?php echo $resfile?> - <?php echo file_get_contents("$DATAROOT/conf/$lang") ?> language</h1> +<h1>File <?php echo $resfile?> - <?php echo get_lang_name($lang) ?> language</h1> <?php while ($line = fgets($file, 4096)) diff --git a/php/resource.php b/php/resource.php index a3361d0..5c7cbba 100644 --- a/php/resource.php +++ b/php/resource.php @@ -1,12 +1,11 @@ <?php include("config.php"); +include("lib.php"); -$lang = $_REQUEST['lang']; +$lang = validate_lang($_REQUEST['lang']); $resfile = $_REQUEST['resfile']; $type = $_REQUEST['type']; $id = $_REQUEST['id']; -if (!file_exists("$DATAROOT/langs/$lang")) - die("Invalid lang parameter"); $norm_fn = preg_replace("/[^A-Za-z0-9]/", "-", $resfile); $file = fopen("$DATAROOT/dumps/$norm_fn/$lang-$type-$id", "r"); @@ -14,7 +13,7 @@ $msgs = array(); ?> <html> <body> -<h1>File <?php echo $resfile?> - <?php echo file_get_contents("$DATAROOT/conf/$lang") ?> language - Resource <?php echo "$id ($type)"?></h1> +<h1>File <?php echo $resfile?> - <?php echo get_lang_name($lang) ?> language - Resource <?php echo "$id ($type)"?></h1> <table style="background-color: #f8f8ff"> <tr style="background-color: #f0f0ff"><th colspan="2">String table #<?php echo $id?></th></tr>
1
0
0
0
Mikolaj Zalewski : add a local prehook
by Alexandre Julliard
19 Jun '09
19 Jun '09
Module: tools Branch: master Commit: 3e03aff51d1a7c66936673b83ff18437f9fc898f URL:
http://source.winehq.org/git/tools.git/?a=commit;h=3e03aff51d1a7c66936673b8…
Author: Mikolaj Zalewski <mikolajz(a)tygrys.dom> Date: Wed Feb 13 11:36:46 2008 +0100 add a local prehook --- .gitignore | 1 + scripts/Master.sh | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 8485d8d..af334cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /work/* /scripts/config /scripts/local-posthook.sh +/scripts/local-prehook.sh /php/conf /php/dumps /php/langs \ No newline at end of file diff --git a/scripts/Master.sh b/scripts/Master.sh index dace16c..addb75a 100755 --- a/scripts/Master.sh +++ b/scripts/Master.sh @@ -9,6 +9,10 @@ fi . ./config +if [ -x ./local-prehook.sh ]; then + ./local-prehook.sh +fi + function die { echo $1 >>"$WORKDIR/run.log" cat "$WORKDIR/run.log"
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200