WordPress.org

Making WordPress.org

Changeset 2065


Ignore:
Timestamp:
11/10/2015 01:29:07 AM (4 years ago)
Author:
dd32
Message:

Translate: Stats Overview: The table is now ordered by:

  1. Average Translation percentage
  2. Least Waiting Strings
  3. Alphabetical by locale slug

2 is new, previously the waiting column wasn't included which was confusing when multiple projects were at 100%, some having more waiting strings than others.

File:
1 edited

Legend:

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

    r2064 r2065  
    116116       
    117117        // Sort by Percent Complete, secondly by Slug
    118         uksort( $translation_locale_complete, function ( $a, $b ) use ( $translation_locale_complete ) {
     118        uksort( $translation_locale_complete, function ( $a, $b ) use ( $translation_locale_complete, $translation_locale_statuses ) {
    119119            if ( $translation_locale_complete[ $a ] < $translation_locale_complete[ $b ] ) {
    120120                return 1;
    121121            } elseif ( $translation_locale_complete[ $a ] == $translation_locale_complete[ $b ] ) {
    122                 return strnatcmp( $a, $b );
     122                if ( $translation_locale_statuses[ $a ]['waiting'] != $translation_locale_statuses[ $b ]['waiting'] ) {
     123                    return strnatcmp( $translation_locale_statuses[ $a ]['waiting'], $translation_locale_statuses[ $b ]['waiting'] );
     124                } else {
     125                    return strnatcmp( $a, $b );
     126                }
    123127            } else {
    124128                return -1;
Note: See TracChangeset for help on using the changeset viewer.