[Bug 65456] Language statistics pages use wrong base to compute percentages

2014-05-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=65456

--- Comment #3 from Purodha Blissenbach bugzilla.wikime...@publi.purodha.net 
---
(In reply to Andre Klapper from comment #2)
 (In reply to Purodha Blissenbach from comment #1)
  Since git/gerrit do not work for me
 
 You could try http://tools.wmflabs.org/gerrit-patch-uploader/

It does not work either. It asks me to login, then:

Application Connection Error
To use Connected Apps on this site, you must have an account across all
projects. When you have an account on all projects, you can try to connect
Gerrit Patch Uploader again.

Unified login needed, E008

Return to MediaWiki.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 65456] Language statistics pages use wrong base to compute percentages

2014-05-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=65456

--- Comment #2 from Andre Klapper aklap...@wikimedia.org ---
(In reply to Purodha Blissenbach from comment #1)
 Since git/gerrit do not work for me

You could try http://tools.wmflabs.org/gerrit-patch-uploader/

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 65456] Language statistics pages use wrong base to compute percentages

2014-05-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=65456

--- Comment #1 from Purodha Blissenbach bugzilla.wikime...@publi.purodha.net 
---
Since git/gerrit do not work for me, and I cannot install omegawiki (see
abovementioned link) here is a list of changes, just in case someone want to
try them out:


diff --git a/includes/specials/SpecialOWStatistics.php
b/includes/specials/SpecialOWStatistics.php
index bc5e6d5..01fe441 100644
--- a/includes/specials/SpecialOWStatistics.php
+++ b/includes/specials/SpecialOWStatistics.php
@@ -100,7 +100,7 @@ class SpecialOWStatistics extends SpecialPage {
$max = max ( $nbDMArray ) ;

foreach ($nbDMArray as $lang = $dm) {
-   $tableLang .= $this-addTableRowWithBar( $lang, $dm,
$max );
+   $tableLang .= $this-addTableRowWithBar( $lang, $dm,
$max , $nbdm );
}
$tableLang .= Html::closeElement( 'table' );

@@ -154,7 +154,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbDefArray ) ;
$max = max ( $nbDefArray ) ;
foreach ($nbDefArray as $lang = $def) {
-   $tableLang .= $this-addTableRowWithBar( $lang, $def,
$max );
+   $tableLang .= $this-addTableRowWithBar( $lang, $def,
$max , $nbDefTot );
}

$tableLang .= Html::closeElement( 'table' );
@@ -206,7 +206,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbexpArray ) ;
$max = max ( $nbexpArray ) ;
foreach ($nbexpArray as $lang = $exp) {
-   $tableLang .= $this-addTableRowWithBar( $lang, $exp,
$max );
+   $tableLang .= $this-addTableRowWithBar( $lang, $exp,
$max , $nbexptot );
}

$tableLang .= Html::closeElement( 'table' );
@@ -259,7 +259,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbSyntransArray ) ;
$max = max ( $nbSyntransArray ) ;
foreach ($nbSyntransArray as $lang = $syntrans) {
-   $tableLang .= $this-addTableRowWithBar( $lang,
$syntrans, $max );
+   $tableLang .= $this-addTableRowWithBar( $lang,
$syntrans, $max , $nbSyntransTot );
}
$tableLang .= Html::closeElement( 'table' );

@@ -361,11 +361,12 @@ class SpecialOWStatistics extends SpecialPage {
 * adds a row in a table with three columns
 * the first column is e.g. the language name
 * the second column is a value
-* the third column shows a bar according to value/max
+* the third column shows a bar according to $value/$max
+*  followed by a percent figure based on $value/$total
 */
-   function addTableRowWithBar ( $firstcol, $value, $max ) {
+   function addTableRowWithBar ( $firstcol, $value, $max , $total ) {
$wi = ceil( ( ( $value / $max ) * 500 ) );
-   $per = ceil( ( ( $value / $max ) * 100 ) );
+   $per = ceil( ( ( $value / $total ) * 100 ) );

$row = Html::openElement( 'tr' );
$row .= Html::element( 'td', array(), $firstcol );

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 65456] Language statistics pages use wrong base to compute percentages

2014-05-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=65456

Purodha Blissenbach bugzilla.wikime...@publi.purodha.net changed:

   What|Removed |Added

   Assignee|bugzilla.wikime...@publi.pu |wikibugs-l@lists.wikimedia.
   |rodha.net   |org

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l