Making WordPress.org

Changeset 1873


Ignore:
Timestamp:
09/11/2015 07:21:33 AM (9 years ago)
Author:
dd32
Message:

Translate: On the Waiting tab, display the full project hierarchy of names. Since there's no context as to what the parent is, a Plugins project would simply display 'Development (trunk)' instead of (for example) 'Beta Tester - Development (trunk)'.

Location:
sites/trunk/translate.wordpress.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-log-warnings-to-slack.php

    r1871 r1873  
    9191        $project = GP::$project->get( $original->project_id );
    9292
    93         $project_name = $project->name;
    94         do {
    95             $parent_project = GP::$project->get( $project->parent_project_id );
    96             $project_name = $parent_project->name . ' - ' . $project_name;
    97         } while ( $parent_project && $parent_project->parent_project_id );
     93        $project_name = $sub_project->name;
     94        $parent_project_id = $project->parent_project_id;
     95        while ( $parent_project_id ) {
     96            $parent_project = GP::$project->get( $parent_project_id );
     97            $parent_project_id = $parent_project->parent_project_id;
     98            $project_name = "{$parent_project->name} - {$project_name}";
     99        }
    98100
    99101        $project_url = gp_url_join( gp_url_public_root(), 'projects', $project->path, $set->locale, '/', $set->slug ) . '?filters[warnings]=yes&sort[by]=translation_date_added';
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-projects.php

    r1872 r1873  
    9090        if ( 'waiting' == $project->slug ) {
    9191            $project_url = gp_url_join( '/projects', $sub_project->path, $locale_slug, $set_slug ) . '?filters[status]=waiting&filters[status]=fuzzy';
     92
     93            $project_name = $sub_project->name;
     94            $parent_project_id = $sub_project->parent_project_id;
     95            while ( $parent_project_id ) {
     96                $parent_project = GP::$project->get( $parent_project_id );
     97                $parent_project_id = $parent_project->parent_project_id;
     98                $project_name = "{$parent_project->name} - {$project_name}";
     99            }
     100
    92101        } else {
    93102            $project_url = gp_url_join( '/locale', $locale_slug, $set_slug, $sub_project->path );
     103            $project_name = $sub_project->name;
    94104        }
    95105
     
    111121                <div class="project-name">
    112122                    <h4>
    113                         <?php echo gp_link_get( $project_url, $sub_project->name ) ?>
     123                        <?php echo gp_link_get( $project_url, $project_name ) ?>
    114124                    </h4>
    115125                </div>
Note: See TracChangeset for help on using the changeset viewer.