WordPress.org

Making WordPress.org

Changeset 1854


Ignore:
Timestamp:
08/30/2015 06:08:06 AM (4 years ago)
Author:
dd32
Message:

Translate: Translation stats: Don't round to the nearest integer for sorting purposes, give it 3 decimal places to allow for those close-to-but-not-yet-100% to slot in below the 100%'ers.
See #1202

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-stats-overview.php

    r1853 r1854  
    9696        $translation_locale_complete = array();
    9797        foreach ( $translation_locale_statuses as $locale => $sets ) {
    98             $translation_locale_complete[ $locale ] = round( array_sum( $sets ) / count( $sets ) );
     98            $translation_locale_complete[ $locale ] = round( array_sum( $sets ) / count( $sets ), 3 );
    9999        }
    100100        unset( $locale, $sets );
     101       
    101102        // Sort by Percent Complete, secondly by Slug
    102103        uksort( $translation_locale_complete, function ( $a, $b ) use ( $translation_locale_complete ) {
     
    110111        } );
    111112
    112 
    113113        $this->tmpl( 'stats-overview', get_defined_vars() );
    114114    }
Note: See TracChangeset for help on using the changeset viewer.