Changeset 2048
- Timestamp:
- 11/06/2015 07:45:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-projects-wp-plugins-overview.php
r2046 r2048 16 16 path, locale, locale_slug, 17 17 (100 * stats.current/stats.all) as percent_complete, 18 stats.untranslated as waiting_strings 18 stats.waiting+stats.fuzzy as waiting_strings, 19 stats.untranslated as untranslated 19 20 FROM {$gpdb->prefix}project_translation_status stats 20 21 LEFT JOIN {$gpdb->prefix}projects p ON stats.project_id = p.id … … 41 42 $translation_locale_statuses[ $locale_key ][ $sub_project ] = ( $percent_complete > 50 ) ? floor( $percent_complete ) : ceil( $percent_complete ); 42 43 43 // Increment the amount of waiting strings.44 // Increment the amount of waiting and untranslated strings. 44 45 if ( ! isset( $translation_locale_statuses[ $locale_key ]['waiting'] ) ) { 45 46 $translation_locale_statuses[ $locale_key ]['waiting'] = 0; 46 47 } 48 if ( ! isset( $translation_locale_statuses[ $locale_key ]['untranslated'] ) ) { 49 $translation_locale_statuses[ $locale_key ]['untranslated'] = 0; 50 } 47 51 $translation_locale_statuses[ $locale_key ]['waiting'] += (int) $set->waiting_strings; 52 $translation_locale_statuses[ $locale_key ]['untranslated'] += (int) $set->untranslated; 53 48 54 49 55 ksort( $translation_locale_statuses[ $locale_key ], SORT_NATURAL ); … … 53 59 // Order by waiting strings, ascending. 54 60 uksort( $translation_locale_statuses, function ( $a, $b ) use ( $translation_locale_statuses ) { 55 if ( $translation_locale_statuses[ $a ][' waiting'] > $translation_locale_statuses[ $b ]['waiting'] ) {61 if ( $translation_locale_statuses[ $a ]['untranslated'] > $translation_locale_statuses[ $b ]['untranslated'] ) { 56 62 return 1; 57 } elseif ( $translation_locale_statuses[ $a ][' waiting'] == $translation_locale_statuses[ $b ]['waiting'] ) {63 } elseif ( $translation_locale_statuses[ $a ]['untranslated'] == $translation_locale_statuses[ $b ]['untranslated'] ) { 58 64 return strnatcmp( $a, $b ); 59 65 } else {
Note: See TracChangeset
for help on using the changeset viewer.