Mikolaj Zalewski : show at least one pixel of red if there are errors in translation
Alexandre Julliard
julliard at winehq.org
Fri Jun 19 08:36:17 CDT 2009
Module: tools
Branch: master
Commit: bc16e8b3bb076a3c9a5c9e635f07429039e9c488
URL: http://source.winehq.org/git/tools.git/?a=commit;h=bc16e8b3bb076a3c9a5c9e635f07429039e9c488
Author: Mikolaj Zalewski <mikolajz at 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\">";
More information about the wine-cvs
mailing list