Changeset 8348
- Timestamp:
- 02/25/2019 10:22:52 PM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates
- Files:
-
- 3 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 -
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 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-overview.php
r8242 r8348 27 27 foreach ( $translation_locale_complete as $locale_slug => $total_complete ) : 28 28 $gp_locale = GP_Locales::by_slug( $locale_slug ); 29 $set_slug = 'default'; 30 // Variants (de/formal for example) don't have GP_Locales in this context 31 if ( ! $gp_locale && strpos( $locale_slug, '/' ) && ( list( $base_locale_slug, $set_slug ) = explode( '/', $locale_slug ) ) ) { 32 $_gp_locale = GP_Locales::by_slug( $base_locale_slug ); 33 if ( $_gp_locale ) { 34 $gp_locale = clone $_gp_locale; 35 // Just append it for now.. 36 $gp_locale->wp_locale .= '/' . $set_slug; 37 } 38 } 29 39 30 if ( ! $gp_locale || ! $gp_locale->wp_locale ) { 40 31 continue; 41 32 } 42 ?> 33 34 list( $locale, $set_slug ) = array_merge( explode( '/', $locale_slug ), [ 'default' ] ); 35 ?> 43 36 <tr> 44 37 <th title="<?php echo esc_attr( $gp_locale->english_name ); ?>"> 45 <a href="<?php echo esc_url( gp_url( gp_url_join( 'locale', $ gp_locale->slug, $set_slug ) ) ); ?>">38 <a href="<?php echo esc_url( gp_url( gp_url_join( 'locale', $locale, $set_slug ) ) ); ?>"> 46 39 <?php echo esc_html( $gp_locale->wp_locale ); ?> 47 40 </a> … … 49 42 <?php 50 43 foreach ( $projects as $slug => $project ) { 51 $projecturl = gp_url( gp_url_join( 'locale', $ gp_locale->slug, $set_slug, $project->path ) );44 $projecturl = gp_url( gp_url_join( 'locale', $locale, $set_slug, $project->path ) ); 52 45 $project_name = str_replace( array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory' ), '', $project->name ); 53 46
Note: See TracChangeset
for help on using the changeset viewer.