WordPress.org

Making WordPress.org

Changeset 2181


Ignore:
Timestamp:
12/09/2015 08:32:12 PM (6 years ago)
Author:
ocean90
Message:

Translate: Show plugin warnings on locale projects too.

See [2118], [2119].
Fixes #1450.

Location:
sites/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/locale.php

    r2080 r2181  
    153153
    154154        $sub_projects = $this->get_active_sub_projects( $sub_project, true );
     155        $sub_project_slugs = array();
    155156        if ( $sub_projects ) {
    156157            $sub_project_statuses = array();
    157158            foreach ( $sub_projects as $key => $_sub_project ) {
     159                $sub_project_slugs[] = $_sub_project->slug;
    158160                $status = $this->get_project_status( $_sub_project, $locale_slug, $set_slug, null, false );
    159161
  • sites/trunk/translate.wordpress.org/public_html/gp-templates-new/locale-project.php

    r1778 r2181  
    9191    </div>
    9292</div>
     93
     94<?php
     95if ( 'wp-plugins' === $project->path && ! in_array( 'dev', $sub_project_slugs ) && ! in_array( 'stable', $sub_project_slugs ) ) {
     96    ?>
     97    <div class="wporg-notice wporg-notice-warning">
     98        <p>This plugin is not properly prepared for localization. If you would like to translate this plugin, <a href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $sub_project->slug ); ?>">please contact the author.</a></p>
     99    </div>
     100    <?php
     101}
     102?>
    93103
    94104<div class="locale-project">
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-project.php

    r1778 r2181  
    9191    </div>
    9292</div>
     93
     94<?php
     95if ( 'wp-plugins' === $project->path && ! in_array( 'dev', $sub_project_slugs ) && ! in_array( 'stable', $sub_project_slugs ) ) {
     96    ?>
     97    <div class="wporg-notice wporg-notice-warning">
     98        <p>This plugin is not properly prepared for localization. If you would like to translate this plugin, <a href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $sub_project->slug ); ?>">please contact the author.</a></p>
     99    </div>
     100    <?php
     101}
     102?>
    93103
    94104<div class="locale-project">
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/locale.php

    r2111 r2181  
    153153
    154154        $sub_projects = $this->get_active_sub_projects( $sub_project, true );
     155        $sub_project_slugs = array();
    155156        if ( $sub_projects ) {
    156157            $sub_project_statuses = array();
    157158            foreach ( $sub_projects as $key => $_sub_project ) {
     159                $sub_project_slugs[] = $_sub_project->slug;
    158160                $status = $this->get_project_status( $_sub_project, $locale_slug, $set_slug, null, false );
    159161
Note: See TracChangeset for help on using the changeset viewer.