Changeset 1885
- Timestamp:
- 09/18/2015 12:54:38 AM (9 years ago)
- Location:
- sites/trunk/translate.wordpress.org
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-stats-overview.php
r1881 r1885 32 32 'meta/themes' => false, 33 33 'meta/plugins' => false, 34 'meta/forums' => false, 34 35 'apps/android' => false, 35 'apps/ios' => false 36 'apps/ios' => false, 37 'waiting' => false, 36 38 ); 37 39 … … 54 56 $sql = "SELECT 55 57 path, locale, locale_slug, 56 (100 * stats.current/stats.all) as percent_complete 58 (100 * stats.current/stats.all) as percent_complete, 59 stats.waiting+stats.fuzzy as waiting_strings 57 60 FROM {$gpdb->prefix}project_translation_status stats 58 61 LEFT JOIN {$gpdb->prefix}projects p ON stats.project_id = p.id … … 70 73 } 71 74 $translation_locale_statuses[ $locale_key ][ $set->path ] = floor( (float) $set->percent_complete ); 75 $translation_locale_statuses[ $locale_key ]['waiting'] += (int) $set->waiting_strings; 72 76 } 73 77 unset( $rows, $locale_key, $set ); … … 76 80 $translation_locale_complete = array(); 77 81 foreach ( $translation_locale_statuses as $locale => $sets ) { 82 unset( $sets['waiting'] ); 78 83 $translation_locale_complete[ $locale ] = round( array_sum( $sets ) / count( $sets ), 3 ); 79 84 } -
sites/trunk/translate.wordpress.org/public_html/gp-templates/stats-overview.php
r1859 r1885 51 51 $percent = $translation_locale_statuses[ $locale_slug ][ $project->path ]; 52 52 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 } 55 59 56 60 } else {
Note: See TracChangeset
for help on using the changeset viewer.