Changeset 8348 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/projects-wp-themes.php
- Timestamp:
- 02/25/2019 10:22:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/projects-wp-themes.php
r5502 r8348 62 62 foreach ( $translation_locale_complete as $locale_slug => $total_complete ) : 63 63 $gp_locale = GP_Locales::by_slug( $locale_slug ); 64 $set_slug = 'default';65 64 66 // Variants (de/formal for example) don't have GP_Locales in this context 67 if ( ! $gp_locale && ( list( $base_locale_slug, $set_slug ) = explode( '/', $locale_slug ) ) ) : 68 $_gp_locale = GP_Locales::by_slug( $base_locale_slug ); 69 if ( $_gp_locale ) { 70 $gp_locale = clone $_gp_locale; 71 // Just append it for now.. 72 $gp_locale->wp_locale .= '/' . $set_slug; 73 $gp_locale->english_name .= ' (' . ucfirst( $set_slug ) . ')'; 74 } 75 endif; 65 if ( ! $gp_locale || ! $gp_locale->wp_locale ) { 66 continue; 67 } 76 68 77 if ( ! $gp_locale || ! $gp_locale->wp_locale ) : 78 continue; 79 endif; 80 ?> 69 list( $locale, $set_slug ) = array_merge( explode( '/', $locale_slug ), [ 'default' ] ); 70 ?> 81 71 <tr> 82 72 <th title="<?php echo esc_attr( $gp_locale->wp_locale ); ?>"> 83 <a href="<?php echo esc_url( gp_url( gp_url_join( 'locale', $ gp_locale->slug, $set_slug, $project->path ) ) ); ?>">73 <a href="<?php echo esc_url( gp_url( gp_url_join( 'locale', $locale, $set_slug, $project->path ) ) ); ?>"> 84 74 <?php echo esc_html( $gp_locale->english_name ); ?> 85 75 </a> … … 100 90 } 101 91 102 $link_url = gp_url( gp_url_join( 'locale', $ gp_locale->slug, $set_slug, $project->path ) );92 $link_url = gp_url( gp_url_join( 'locale', $locale, $set_slug, $project->path ) ); 103 93 $link_text = number_format( $percent ); 104 94 else : 105 95 $percent_class = (int) ( $percent / 10 ) * 10; 106 $link_url = gp_url_project( $project->path, gp_url_join( $ gp_locale->slug, $set_slug ) );96 $link_url = gp_url_project( $project->path, gp_url_join( $locale, $set_slug ) ); 107 97 $link_text = "$percent%"; 108 98
Note: See TracChangeset
for help on using the changeset viewer.