Changeset 2055
- Timestamp:
- 11/07/2015 04:18:36 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-stats-overview.php
r1890 r2055 81 81 unset( $rows, $locale_key, $set ); 82 82 83 // Append the Plugins/Themes waiting strings 84 $parent_project_ids = implode(',', array( 85 GP::$project->by_path( 'wp-plugins' )->id, 86 GP::$project->by_path( 'wp-themes' )->id 87 ) ); 88 $sql = "SELECT 89 locale, locale_slug, 90 SUM( stats.waiting ) + SUM( stats.fuzzy ) as waiting_strings 91 FROM {$gpdb->prefix}project_translation_status stats 92 LEFT JOIN {$gpdb->prefix}projects p ON stats.project_id = p.id 93 WHERE 94 p.parent_project_id IN ( $parent_project_ids ) 95 GROUP BY locale, locale_slug"; 96 97 $rows = $gpdb->get_results( $sql ); 98 foreach ( $rows as $set ) { 99 $locale_key = $set->locale; 100 if ( 'default' != $set->locale_slug ) { 101 $locale_key = $set->locale . '/' . $set->locale_slug; 102 } 103 104 $translation_locale_statuses[ $locale_key ]['waiting'] += (int) $set->waiting_strings; 105 } 106 83 107 // Calculate a list of [Locale] = % subtotals 84 108 $translation_locale_complete = array();
Note: See TracChangeset
for help on using the changeset viewer.