Making WordPress.org

Changeset 4512


Ignore:
Timestamp:
12/11/2016 10:10:26 PM (9 years ago)
Author:
ocean90
Message:

Translate: Link locale to locale's project page and show editors in contributor stats table.

Fixes #1388.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php

    r4187 r4512  
    200200                    '<tr>
    201201                        <td class="contributor-name">
     202                            %s
    202203                            <a href="https://profiles.wordpress.org/%s/">%s %s</a>
    203204                            <span>Last Activity: %s ago</span>
     
    222223                        <td>
    223224                    </tr>',
     225                    $contributor->is_editor ? '<span class="translation-editor">Editor</span>' : '',
    224226                    $contributor->nicename,
    225227                    get_avatar( $contributor->email, 40 ),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/projects-wp-plugins-contributors.php

    r2660 r4512  
    9494            printf(
    9595                '<div class="contributors-list-box%s">
    96                     <h4><span class="locale-name">%s<span> <span class="contributors-count">%s</span> <span class="locale-code">#%s</span></h4>
     96                    <h4><span class="locale-name">%s<span> <span class="contributors-count">%s</span> <a href="%s"><span class="locale-code">#%s</span></a></h4>
    9797                    <p><strong>Editors:</strong> %s</p>
    9898                    <p><strong>Contributors:</strong> %s</p>
     
    101101                $locale->english_name,
    102102                sprintf( _n( '%s person', '%s persons', $data['count'] ), number_format_i18n( $data['count'] ) ),
     103                esc_url( gp_url_join( '/locale', $locale->slug, 'default', $project->path ) ),
    103104                $locale->wp_locale,
    104105                wp_sprintf( '%l', $editors_list ),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css

    r3285 r4512  
    14241424.locale-project-contributors-table .contributor-name {
    14251425    width: 40%;
     1426    position: relative;
     1427}
     1428
     1429.locale-project-contributors-table .translation-editor {
     1430    position: absolute;
     1431    top: 37px;
     1432    left: 0;
     1433    width: 40px;
     1434    color: #fff;
     1435    font-weight: 200;
     1436    line-height: 16px;
     1437    text-align: center;
     1438    background-color: #826eb4;
    14261439}
    14271440
     
    14291442    font-size: 11px;
    14301443    display: block;
     1444    margin-top: 13px;
    14311445}
    14321446
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php

    r4511 r4512  
    359359        }
    360360
     361        $editors = array_keys( $locale_contributors['editors'] );
     362
    361363        // Get the names of the contributors.
    362364        foreach ( $contributors as $contributor ) {
    363             if ( isset( $locale_contributors['editors'][ $contributor->user_id ] ) ) {
    364                 continue;
    365             }
    366 
    367 
    368365            if ( isset( $locale_contributors['contributors'][ $contributor->user_id ] ) ) {
    369366                // Update last updated and counts per status.
     
    394391                'waiting_count' => $contributor->waiting_count,
    395392                'fuzzy_count'   => $contributor->fuzzy_count,
     393                'is_editor'     => in_array( $user->ID, $editors ),
    396394            );
    397395        }
    398         unset( $contributors );
     396        unset( $contributors, $editors );
    399397
    400398        uasort( $locale_contributors['contributors'], array( $this, '_sort_contributors_by_total_count_callback' ) );
Note: See TracChangeset for help on using the changeset viewer.