Making WordPress.org


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)'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.