Changeset 13565 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/event.php
- Timestamp:
- 04/18/2024 10:06:30 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/event.php
r13541 r13565 6 6 namespace Wporg\TranslationEvents; 7 7 8 use GP_Locales; 8 9 use WP_User; 9 10 use Wporg\TranslationEvents\Attendee\Attendee; … … 44 45 <?php if ( ! empty( $contributors ) ) : ?> 45 46 <div class="event-contributors"> 46 <h2><?php esc_html_e( 'Contributors', 'gp-translation-events' ); ?></h2> 47 <h2> 48 <?php 49 // translators: %d is the number of contributors. 50 echo esc_html( sprintf( __( 'Contributors (%d)', 'gp-translation-events' ), number_format_i18n( count( $contributors ) ) ) ); 51 ?> 52 </h2> 47 53 <ul> 48 54 <?php foreach ( $contributors as $contributor ) : ?> … … 50 56 <a href="<?php echo esc_url( get_author_posts_url( $contributor->ID ) ); ?>" class="avatar"><?php echo get_avatar( $contributor->ID, 48 ); ?></a> 51 57 <a href="<?php echo esc_url( get_author_posts_url( $contributor->ID ) ); ?>" class="name"><?php echo esc_html( get_the_author_meta( 'display_name', $contributor->ID ) ); ?></a> 52 <?php if ( $stats_calculator->is_ first_time_contributor( $event_start, $contributor->ID ) ) : ?>58 <?php if ( $stats_calculator->is_new_translation_contributor( $event_start, $contributor->ID ) ) : ?> 53 59 <span class="first-time-contributor-tada" title="<?php esc_html_e( 'New Translation Contributor', 'gp-translation-events' ); ?>"></span> 54 60 <?php endif; ?> … … 78 84 <?php if ( ! empty( $attendees ) && ( ! $event->end()->is_in_the_past() || ( ( $attendee instanceof Attendee && $attendee->is_host() ) || current_user_can( 'manage_options' ) || $user->ID === $event->author_id() ) ) ) : ?> 79 85 <div class="event-attendees"> 80 <h2><?php esc_html_e( 'Attendees', 'gp-translation-events' ); ?></h2> 86 <h2> 87 <?php 88 // translators: %d is the number of attendees. 89 echo esc_html( sprintf( __( 'Attendees (%d)', 'gp-translation-events' ), number_format_i18n( count( $attendees ) ) ) ); 90 ?> 91 </h2> 81 92 <ul> 82 93 <?php foreach ( $attendees as $_user ) : ?> … … 84 95 <a href="<?php echo esc_url( get_author_posts_url( $_user->ID ) ); ?>" class="avatar"><?php echo get_avatar( $_user->ID, 48 ); ?></a> 85 96 <a href="<?php echo esc_url( get_author_posts_url( $_user->ID ) ); ?>" class="name"><?php echo esc_html( get_the_author_meta( 'display_name', $_user->ID ) ); ?></a> 86 <?php if ( $stats_calculator->is_ first_time_contributor( $event_start, $_user->ID ) ) : ?>97 <?php if ( $stats_calculator->is_new_translation_contributor( $event_start, $_user->ID ) ) : ?> 87 98 <span class="first-time-contributor-tada" title="<?php esc_html_e( 'New Translation Contributor', 'gp-translation-events' ); ?>"></span> 88 99 <?php endif; ?> … … 147 158 <?php 148 159 foreach ( explode( ',', $row->locales ) as $_locale ) { 149 $_locale = \GP_Locales::by_slug( $_locale );160 $_locale = GP_Locales::by_slug( $_locale ); 150 161 ?> 151 <a href="<?php echo esc_url( gp_url_project_locale( $row->project, $_locale , 'default' ) ); ?>"><?php echo esc_html( $_locale->english_name ); ?></a>162 <a href="<?php echo esc_url( gp_url_project_locale( $row->project, $_locale->slug, 'default' ) ); ?>"><?php echo esc_html( $_locale->english_name ); ?></a> 152 163 <?php 153 164 } … … 200 211 function ( $contributor ) use ( $stats_calculator, $event_start ) { 201 212 $append_tada = ''; 202 if ( $stats_calculator->is_ first_time_contributor( $event_start, $contributor->ID ) ) {213 if ( $stats_calculator->is_new_translation_contributor( $event_start, $contributor->ID ) ) { 203 214 $append_tada = '<span class="first-time-contributor-tada" title="' . esc_html__( 'New Translation Contributor', 'gp-translation-events' ) . '"></span>'; 204 215 }
Note: See TracChangeset
for help on using the changeset viewer.