Changeset 1778 for sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/locale.php
- Timestamp:
- 07/22/2015 11:07:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/locale.php
r1777 r1778 248 248 249 249 if ( $status->all_count ) { 250 $status->percent_complete = ceil( $status->current_count / $status->all_count * 100 ); 250 /* 251 * > 50% round down, so that a project with all strings except 1 translated shows 99%, instead of 100%. 252 * < 50% round up, so that a project with just a few strings shows 1%, instead of 0%. 253 */ 254 $percent_complete = ( $status->current_count / $status->all_count * 100 ); 255 $status->percent_complete = ( $percent_complete > 50 ) ? floor( $percent_complete ) : ceil( $percent_complete ); 251 256 } 252 257 }
Note: See TracChangeset
for help on using the changeset viewer.