Ticket #1202: meta-1202.links-to-projects.patch
File meta-1202.links-to-projects.patch, 1.5 KB (added by , 9 years ago) |
---|
-
sites/trunk/translate.wordpress.org/public_html/gp-templates/stats-overview.php
51 51 // Variants (de/formal for example) don't have GP_Locales in this context 52 52 ?> 53 53 <tr> 54 <th title="<?php echo esc_attr( $gp_locale->english_name ?: $locale_slug ); ?>"><?php echo esc_html( $gp_locale->wp_locale ?: $locale_slug ); ?></th> 54 <th title="<?php echo esc_attr( $gp_locale->english_name ?: $locale_slug ); ?>"> 55 <a href="https://translate.wordpress.org/locale/<?php echo $locale_slug; ?>"> 56 <?php echo esc_html( $gp_locale->wp_locale ?: $locale_slug ); ?> 57 </a> 58 </th> 55 59 <?php foreach ( $projects as $slug => $project ) : 56 60 if ( isset( $translation_locale_statuses[ $locale_slug ][ $project->path ] ) ) { 57 61 $percent = $translation_locale_statuses[ $locale_slug ][ $project->path ]; 58 $percent = '<span style="color:' . get_rgb_for_percent( $percent ) . '">' . $percent . '%</span>'; 59 62 $percent = sprintf( '<a href="%s"><span style="color: %s">%s%%</span></a>', 63 'https://translate.wordpress.org/locale/' . $locale_slug . '/' . $project->path, 64 get_rgb_for_percent( $percent ), 65 $percent 66 ); 60 67 } else { 61 68 $percent = '<span class="none">—</span>'; 62 69 }