WordPress.org

Making WordPress.org

Changeset 1554


Ignore:
Timestamp:
05/07/2015 10:55:36 PM (4 years ago)
Author:
ocean90
Message:

Translate: "Locales & Languages" page:

  • Show WordPress locale instead of GlotPress slug
  • Link contributors to the make/polyglots team page
  • Improve filtering

props SergeyBiryukov.
see #994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/locales.php

    r1530 r1554  
    2525                $percent_complete = floor( $status->current_count / $status->all_count * 100 );
    2626            }
     27
     28            $wp_locale = ( isset( $locale->wp_locale ) ) ? $locale->wp_locale : $locale->slug;
    2729            ?>
    2830            <div class="locale <?php echo 'percent-' . $percent_complete; ?>">
     
    3032                    <li class="english"><?php echo gp_link_get( gp_url_join( gp_url_current(), $locale->slug ), $locale->english_name ) ?></li>
    3133                    <li class="native"><?php echo gp_link_get( gp_url_join( gp_url_current(), $locale->slug ), $locale->native_name ) ?></li>
    32                     <li class="code"><?php echo gp_link_get( gp_url_join( gp_url_current(), $locale->slug ), $locale->slug ) ?></li>
     34                    <li class="code"><?php echo gp_link_get( gp_url_join( gp_url_current(), $locale->slug ), $wp_locale ) ?></li>
    3335                </ul>
    3436                <div class="contributors">
     
    3638                    <?php
    3739                    $contributors = isset( $contributors_count[ $locale->slug ] ) ? $contributors_count[ $locale->slug ] : 0;
    38                     echo $contributors;
     40                    echo gp_link_get( 'https://make.wordpress.org/polyglots/teams/?locale=' . $wp_locale, $contributors );
    3941                    ?>
    4042                </div>
     
    6264                    $rows.hide();
    6365                    $rows.filter( function( i, v ) {
    64                         var $t = $(this);
     66                        $t = $(this).find( '.name' );
    6567                        for ( var d = 0; d < words.length; ++d ) {
    6668                            if ( $t.text().toLowerCase().indexOf( words[d] ) != -1 ) {
Note: See TracChangeset for help on using the changeset viewer.