Making WordPress.org


Ignore:
Timestamp:
09/18/2015 12:54:38 AM (9 years ago)
Author:
dd32
Message:

Translate: Stats overview: Add the Forums and Waiting projects to the table. The Waiting column shows the number of strings waiting.
I attempted to add the Colour coding to the waiting list, but a straight percentage calculation isn't the best option, it needs to use a logarithemtric scale, on a percentage scale those with 500 waiting strings look great compared to 2000.
See #1202

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/stats-overview.php

    r1859 r1885  
    5151                            $percent = $translation_locale_statuses[ $locale_slug ][ $project->path ];
    5252
    53                             $percent_class = 'percent' . (int) ( $percent / 10 ) * 10;
    54                             echo '<td class="' . $percent_class .'"><a href="' . $projecturl . '">' . $percent . '%</a></td>';
     53                            if ( 'waiting' === $project->path  ) {
     54                                echo '<td><a href="' . $projecturl . '">' . number_format( $percent ) . '</a></td>';
     55                            } else {
     56                                $percent_class = 'percent' . (int) ( $percent / 10 ) * 10;
     57                                echo '<td class="' . $percent_class .'"><a href="' . $projecturl . '">' . $percent . '%</a></td>';
     58                            }
    5559
    5660                        } else {
Note: See TracChangeset for help on using the changeset viewer.