Making WordPress.org

Changeset 2485


Ignore:
Timestamp:
02/09/2016 12:43:02 PM (10 years ago)
Author:
ocean90
Message:

WP i18n teams: Introduce a new filter for locales which don't have a WP project.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/css/i18n-teams.css

    r2229 r2485  
    3232.translators-info.show-no-releases tbody tr.no-releases,
    3333.translators-info.show-no-site tbody tr.no-site,
     34.translators-info.show-no-wp-project tbody tr.no-wp-project,
    3435.translators-info.show-translated-100 tbody tr.translated-100,
    3536.translators-info.show-translated-95 tbody tr.translated-95,
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/all-locales.php

    r2478 r2485  
    3333            'translated-50' => _n_noop( '%s locale has more than 50%%.', '%s locales have more than 50%%.', 'wporg' ),
    3434            'translated-50-less' => _n_noop( '%s locale has less than 50%%.', '%s locales have less than 50%%.', 'wporg' ),
     35            'no-wp-project' => _n_noop( '%s locale doesn’t have a WP project.', '%s locales don᾿t have a WP project.', 'wporg' ),
    3536        );
    3637
     
    8889                    </td>
    8990                    <td data-column-title="<?php esc_attr_e( 'GlotPress', 'wporg' ); ?>" class="right no-right-border">
    90                         <a href="https://translate.wordpress.org/locale/<?php echo $locale->slug; ?>">
    91                             <?php echo ( isset( $percentages[ $locale->wp_locale ] ) ) ? $percentages[ $locale->wp_locale ] . '%' : '&mdash;'; ?>
    92                         </a>
     91                        <?php if ( isset( $percentages[ $locale->wp_locale ] ) ) : ?>
     92                            <a href="https://translate.wordpress.org/locale/<?php echo $locale->slug; ?>/default/wp/dev">
     93                                <?php echo $percentages[ $locale->wp_locale ] . '%'; ?>
     94                            </a>
     95                        <?php else : ?>
     96                            &mdash;
     97                        <?php endif; ?>
    9398                    </td>
    9499                    <td class="no-left-border nowrap">
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/wp-i18n-teams.php

    r2479 r2485  
    150150
    151151        $statuses = array(
     152            'no-wp-project'      => 0,
    152153            'no-site'            => 0,
    153154            'no-releases'        => 0,
     
    174175            $statuses[ $release_status ]++;
    175176
    176             $translation_status = '';
    177177            if ( isset ( $translation_data[ $locale->wp_locale ] ) ) {
    178178                $translation_status = self::get_locale_translation_status( $translation_data[ $locale->wp_locale ] );
    179179                $statuses[ $translation_status ]++;
     180            } else {
     181                $translation_status = 'no-wp-project';
     182                $statuses[ 'no-wp-project' ]++;
    180183            }
    181184
Note: See TracChangeset for help on using the changeset viewer.