Changeset 1778
- Timestamp:
- 07/22/2015 11:07:44 AM (9 years ago)
- Location:
- sites/trunk/translate.wordpress.org
- Files:
-
- 3 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 } -
sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-project.php
r1768 r1778 111 111 <td class="set-name"> 112 112 <strong><?php gp_link( gp_url_project( $sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), $sub_project->name ); ?></strong> 113 <?php if ( $sub_project_status->percent_complete > 90 ): 114 ?> 115 <span class="bubble morethan90"><?php echo $sub_project_status->percent_complete; ?>%</span> 116 <?php endif;?> 113 <?php if ( $sub_project_status->percent_complete > 90 ) : ?> 114 <span class="sub-project-status percent-90"><?php echo $sub_project_status->percent_complete; ?>%</span> 115 <?php else : ?> 116 <span class="sub-project-status"><?php echo $sub_project_status->percent_complete; ?>%</span> 117 <?php endif; ?> 117 118 </td> 118 119 <td class="stats translated"> … … 141 142 <td class="set-name"> 142 143 <strong><?php gp_link( gp_url_project( $sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), $sub_project->name ); ?></strong> 143 <?php if ( $status->percent_complete > 90 ): 144 ?> 145 <span class="bubble morethan90"><?php echo $status->percent_complete; ?>%</span> 146 <?php endif;?> 144 <?php if ( $status->percent_complete > 90 ) : ?> 145 <span class="sub-project-status percent-90"><?php echo $status->percent_complete; ?>%</span> 146 <?php else : ?> 147 <span class="sub-project-status"><?php echo $status->percent_complete; ?>%</span> 148 <?php endif; ?> 147 149 </td> 148 150 <td class="stats translated"> -
sites/trunk/translate.wordpress.org/public_html/gp-templates/style.css
r1761 r1778 798 798 } 799 799 800 .locale-sub-projects .sub-project-status { 801 font-size: 90%; 802 color: #a0a5aa; 803 padding-left: .5em; 804 } 805 806 .locale-sub-projects .sub-project-status.percent-90 { 807 color: #509040; 808 } 809 800 810 /* Responsive styles */ 801 811 @media (max-width: 700px) {
Note: See TracChangeset
for help on using the changeset viewer.