Changeset 5344 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/locale-details.php
- Timestamp:
- 04/15/2017 10:14:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/locale-details.php
r5160 r5344 11 11 <ul id="locale-details"> 12 12 <li> 13 <strong><?php _e( 'Locale site:', 'wporg' ); ?></strong> 14 <?php if ( $locale_data['rosetta_site_url'] ) : ?> 15 <a href="<?php echo esc_url( $locale_data['rosetta_site_url'] ); ?>"><?php echo parse_url( $locale_data['rosetta_site_url'], PHP_URL_HOST ); ?></a> 16 <?php else : ?> 17 — 18 <?php endif; ?> 19 </li> 20 <li> 21 <strong><?php _e( 'Team site:', 'wporg' ); ?></strong> 22 <?php if ( $locale_data['team_url'] ) : ?> 23 <a href="<?php echo esc_url( $locale_data['team_url'] ); ?>"><?php 24 $url = parse_url( $locale_data['team_url'] ); 25 printf( '%s%s', $url['host'], $url['path'] ); 26 ?></a> 27 <?php else : ?> 28 — 29 <?php endif; ?> 30 </li> 31 <li> 32 <strong><?php _e( 'Forums:', 'wporg' ); ?></strong> 33 <?php if ( $locale_data['forums_url'] ) : ?> 34 <a href="<?php echo esc_url( $locale_data['forums_url'] ); ?>"><?php 35 $url = parse_url( $locale_data['forums_url'] ); 36 printf( '%s%s', $url['host'], $url['path'] ); 37 ?></a> 38 <?php else : ?> 13 <strong><?php _e( 'Sites:', 'wporg' ); ?></strong> 14 <?php 15 if ( $locale_data['sites'] ) : 16 echo implode( ', ', array_map( function( $site ) { 17 return sprintf( 18 '<a href="%s">%s (%s)</a>', 19 esc_url( $site->home ), 20 esc_html( $site->blogname ), 21 esc_html( $site->domain . $site->path ) 22 ); 23 }, $locale_data['sites'] ) ); 24 else : ?> 39 25 — 40 26 <?php endif; ?> … … 80 66 </div> 81 67 68 <?php if ( ! empty( $locale_data['locale_managers'] ) ) : ?> 69 <h2><?php printf( __( 'Locale Managers (%s)', 'wporg' ), number_format_i18n( count( $locale_data['locale_managers'] ) ) ); ?></h2> 82 70 83 <h2><?php printf( __( 'General Translation Editors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['validators'] ) ) ); ?></h2> 71 <ul class="validators"> 72 <?php foreach ( $locale_data['locale_managers'] as $locale_manager ) : 73 ?> 74 <li> 75 <a class="profile" href="https://profiles.wordpress.org/<?php echo esc_attr( $locale_manager['nice_name'] ); ?>"><?php 76 echo get_avatar( $locale_manager['email'], 60 ); 77 echo esc_html( $locale_manager['display_name'] ); 78 ?></a> 79 <?php 80 if ( $locale_manager['slack'] ) { 81 printf( '<span class="user-slack">@%s on <a href="%s">Slack</a></span>', $locale_manager['slack'], 'https://make.wordpress.org/chat/' ); 82 } 83 ?> 84 </li> 85 <?php endforeach; ?> 86 </ul> 87 <?php endif; ?> 84 88 85 <?php if ( empty( $locale_data['validators'] ) ) : ?> 86 <p><?php 87 /* translators: %s: language name in English */ 88 printf( __( '%s does not have General or Project translation editors yet.', 'wporg' ), $locale->english_name ); 89 ?></p> 90 <?php else : ?> 89 <?php if ( ! empty( $locale_data['validators'] ) ) : ?> 90 <h2><?php printf( __( 'General Translation Editors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['validators'] ) ) ); ?></h2> 91 91 92 <ul class="validators"> 92 93 <?php foreach ( $locale_data['validators'] as $validator ) : … … 106 107 </ul> 107 108 <?php endif; ?> 108 109 109 110 110 <?php if ( ! empty( $locale_data['project_validators'] ) ) : ?> … … 129 129 <?php endif; ?> 130 130 131 <h2><?php printf( __( 'All Translation Contributors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['translators'] ) ) ); ?></h2> 131 <?php if ( ! empty( $locale_data['translators'] ) ) : ?> 132 <h2><?php printf( __( 'All Translation Contributors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['translators'] ) ) ); ?></h2> 132 133 133 <?php if ( empty( $locale_data['translators'] ) ) : ?>134 <p><?php printf( __( '%s does not have any translators yet.', 'wporg' ), $locale->english_name ); ?></p>135 <?php else :?>136 134 <p> 137 135 <?php … … 149 147 <?php endif; ?> 150 148 151 <p class="alert alert-info" role="alert"> 152 <a href="https://translate.wordpress.org/locale/<?php echo esc_attr( $locale->slug ); ?>"><?php 149 <?php 150 $notice = sprintf( 151 '%s <a href="https://translate.wordpress.org/locale/%s">%s</a>', 152 __( 'Is this a language that you speak?', 'wporg' ), 153 esc_attr( $locale->slug ), 154 sprintf( 153 155 /* translators: %s: language name in English */ 154 printf( __( 'Is this a language that you speak? Join the WordPress translation team for %s!', 'wporg' ), $locale->english_name ); 155 ?></a> 156 </p> 156 __( 'Join the WordPress translation team for %s!', 'wporg' ), 157 esc_html( $locale->english_name ) 158 ) 159 ); 160 echo do_shortcode( "[info]{$notice}[/info]" );
Note: See TracChangeset
for help on using the changeset viewer.