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