Making WordPress.org


Ignore:
Timestamp:
04/18/2024 10:06:30 AM (20 months ago)
Author:
amieiro
Message:

Translate: Sync "Translation Events" from GitHub

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  
    66namespace Wporg\TranslationEvents;
    77
     8use GP_Locales;
    89use WP_User;
    910use Wporg\TranslationEvents\Attendee\Attendee;
     
    4445        <?php if ( ! empty( $contributors ) ) : ?>
    4546            <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>
    4753                <ul>
    4854                    <?php foreach ( $contributors as $contributor ) : ?>
     
    5056                            <a href="<?php echo esc_url( get_author_posts_url( $contributor->ID ) ); ?>" class="avatar"><?php echo get_avatar( $contributor->ID, 48 ); ?></a>
    5157                            <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 ) ) : ?>
    5359                                <span class="first-time-contributor-tada" title="<?php esc_html_e( 'New Translation Contributor', 'gp-translation-events' ); ?>"></span>
    5460                            <?php endif; ?>
     
    7884        <?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() ) ) ) : ?>
    7985            <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>
    8192                <ul>
    8293                    <?php foreach ( $attendees as $_user ) : ?>
     
    8495                            <a href="<?php echo esc_url( get_author_posts_url( $_user->ID ) ); ?>" class="avatar"><?php echo get_avatar( $_user->ID, 48 ); ?></a>
    8596                            <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 ) ) : ?>
    8798                                <span class="first-time-contributor-tada" title="<?php esc_html_e( 'New Translation Contributor', 'gp-translation-events' ); ?>"></span>
    8899                            <?php endif; ?>
     
    147158                        <?php
    148159                        foreach ( explode( ',', $row->locales ) as $_locale ) {
    149                             $_locale = \GP_Locales::by_slug( $_locale );
     160                            $_locale = GP_Locales::by_slug( $_locale );
    150161                            ?>
    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>
    152163                            <?php
    153164                        }
     
    200211                                    function ( $contributor ) use ( $stats_calculator, $event_start ) {
    201212                                        $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 ) ) {
    203214                                            $append_tada = '<span class="first-time-contributor-tada" title="' . esc_html__( 'New Translation Contributor', 'gp-translation-events' ) . '"></span>';
    204215                                        }
Note: See TracChangeset for help on using the changeset viewer.