Making WordPress.org


Ignore:
Timestamp:
07/12/2015 05:42:47 PM (9 years ago)
Author:
ocean90
Message:

Translate: Further design improvements for project portals.

see #1091.

File:
1 edited

Legend:

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

    r1721 r1734  
    9494            $sub_project_statuses = array();
    9595            foreach ( $sub_projects as $key => $_sub_project ) {
    96                 $status = $this->get_project_status( $_sub_project, $locale_slug, $set_slug );
    97                 if ( ! $status->all_count ) {
    98                     unset( $sub_projects[ $key ] );
    99                 }
     96                $status = $this->get_project_status( $_sub_project, $locale_slug, $set_slug, null, false );
    10097
    10198                $sub_project_statuses[ $_sub_project->id ] = $status;
     
    181178            $status->fuzzy_count        = 0;
    182179            $status->all_count          = 0;
     180            $status->percent_complete   = 0;
    183181        }
    184182
     
    195193            $status->fuzzy_count        += (int) $set->fuzzy_count();
    196194            $status->all_count          += (int) $set->all_count();
     195
     196            if ( $status->all_count ) {
     197                $status->percent_complete = floor( $status->current_count / $status->all_count * 100 );
     198            }
    197199        }
    198200
     
    201203            if ( $sub_projects ) {
    202204                foreach ( $sub_projects as $sub_project ) {
    203                     $this->get_project_status( $sub_project, $locale, $set_slug, $status );
     205                    $this->get_project_status( $sub_project, $locale, $set_slug, $status, false );
    204206                }
    205207            }
Note: See TracChangeset for help on using the changeset viewer.