Making WordPress.org


Ignore:
Timestamp:
02/25/2018 05:14:19 PM (6 years ago)
Author:
ocean90
Message:

Translate: Add remaining count to project boxes.

Fixes #2859.

File:
1 edited

Legend:

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

    r6693 r6742  
    119119    <?php
    120120    foreach ( $sub_projects as $sub_project ) {
    121         $percent_complete = $waiting = $sub_projects_count = $fuzzy = 0;
     121        $percent_complete = $waiting = $sub_projects_count = $fuzzy = $remaining = 0;
    122122        if ( isset( $project_status[ $sub_project->id ] ) ) {
    123123            $status = $project_status[ $sub_project->id ];
     
    125125            $waiting = $status->waiting_count;
    126126            $fuzzy = $status->fuzzy_count;
     127            $remaining = $status->all_count - $status->current_count;
    127128            $sub_projects_count = $status->sub_projects_count;
    128129        }
     
    178179            <div class="project-status">
    179180                <div class="project-status-sub-projects">
    180                     <span class="project-status-title">Sub-Projects</span>
    181                     <span class="project-status-value"><?php echo $sub_projects_count; ?></span>
     181                    <span class="project-status-title">Projects</span>
     182                    <span class="project-status-value"><?php echo number_format_i18n( $sub_projects_count ); ?></span>
    182183                </div>
    183184                <div class="project-status-waiting">
    184185                    <span class="project-status-title">Waiting/Fuzzy</span>
    185                     <span class="project-status-value"><?php echo $waiting + $fuzzy; ?></span>
     186                    <span class="project-status-value"><?php echo number_format_i18n( $waiting + $fuzzy ); ?></span>
     187                </div>
     188                <div class="project-status-remaining">
     189                    <span class="project-status-title">Remaining</span>
     190                    <span class="project-status-value"><?php echo number_format_i18n( $remaining ); ?></span>
    186191                </div>
    187192                <div class="project-status-progress">
    188193                    <span class="project-status-title">Progress</span>
    189                     <span class="project-status-value"><?php echo $percent_complete; ?>%</span>
     194                    <span class="project-status-value"><?php echo number_format_i18n( $percent_complete ); ?>%</span>
    190195                </div>
    191196            </div>
Note: See TracChangeset for help on using the changeset viewer.