Changeset 2049
- Timestamp:
- 11/06/2015 07:50:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates/projects-wp-plugins.php
r2046 r2049 58 58 ?> 59 59 <tr> 60 <th title="<?php echo esc_attr( $gp_locale-> english_name ); ?>">61 <a href="<?php echo gp_url _join( 'locale', $gp_locale->slug, $set_slug); ?>">60 <th title="<?php echo esc_attr( $gp_locale->wp_locale ); ?>"> 61 <a href="<?php echo gp_url( gp_url_join( 'locale', $gp_locale->slug, $set_slug ) ); ?>"> 62 62 <?php echo esc_html( $gp_locale->english_name ); ?> 63 63 </a> … … 65 65 <?php 66 66 if ( $set ) : 67 foreach ( array( 'dev', 'dev-readme', 'stable', 'stable-readme', 'waiting' ) as $s lug ) :68 if ( isset( $translation_locale_statuses[ $locale_slug ][ $s lug ] ) ) :69 $percent = $translation_locale_statuses[ $locale_slug ][ $s lug ];67 foreach ( array( 'dev', 'dev-readme', 'stable', 'stable-readme', 'waiting' ) as $subproject_slug ) : 68 if ( isset( $translation_locale_statuses[ $locale_slug ][ $subproject_slug ] ) ) : 69 $percent = $translation_locale_statuses[ $locale_slug ][ $subproject_slug ]; 70 70 71 if ( 'waiting' === $s lug ) :71 if ( 'waiting' === $subproject_slug ) : 72 72 // Color code it on -0~500 waiting strings 73 $percent_class = 100 -min( (int) ( $percent / 50 ) * 10, 100 );73 $percent_class = 100 - min( (int) ( $percent / 50 ) * 10, 100 ); 74 74 75 75 // It's only 100 if it has 0 strings. … … 78 78 endif; 79 79 80 $ percent_class = 'percent' . $percent_class;81 echo '<td data-sort-value="'. esc_attr( $percent ) . '" class="' . $percent_class .'">' . number_format( $percent ) . '</td>';80 $link_url = gp_url( gp_url_join( 'locale', $locale_slug, $set_slug, $project->path ) ); 81 $link_text = number_format( $percent ); 82 82 else : 83 $percent_class = 'percent' . (int) ( $percent / 10 ) * 10; 83 $percent_class = (int) ( $percent / 10 ) * 10; 84 $link_url = gp_url_join( $project->slug, $subproject_slug, $locale_slug, $set_slug ); 85 $link_text = "$percent%"; 84 86 85 echo '<td data-sort-value="' . esc_attr( $percent ) . '" class="' . $percent_class .'">';86 gp_link( gp_url_project( $project->path, gp_url_join( $slug, $locale_slug, $set_slug ), array( 'filters[translated]' => 'yes', 'filters[status]' => 'current') ), "$percent%" );87 echo '</td>';88 87 endif; 88 89 echo '<td data-sort-value="' . esc_attr( $percent ) . '" class="percent' . $percent_class .'">'. gp_link_get( $link_url, $link_text ) . '</td>'; 89 90 else : 90 91 echo '<td class="none" data-sort-value="-1">—</td>';
Note: See TracChangeset
for help on using the changeset viewer.