Making WordPress.org


Ignore:
Timestamp:
02/26/2018 08:14:23 PM (7 years ago)
Author:
ocean90
Message:

Translate: Split translation editors list into project and inherited editors.

Fixes #3461.

File:
1 edited

Legend:

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

    r6694 r6770  
    259259    </div>
    260260
    261     <?php if ( $locale_contributors['editors'] ) : ?>
    262         <div class="locale-project-contributors-group locale-project-contributors-editors">
    263             <h3>Translation Editors</h3>
    264             <small>These users can validate and approve your translations.</small>
    265             <br><br>
     261    <div class="locale-project-contributors-group locale-project-contributors-editors">
     262        <h3>Translation Editors</h3>
     263        <?php
     264        if ( $locale_contributors['editors']['project'] ) :
     265            ?>
     266            <p>These users can validate and approve your translations for this specific project.</p>
    266267            <ul>
    267268                <?php
    268                 foreach ( $locale_contributors['editors'] as $editor ) {
     269                foreach ( $locale_contributors['editors']['project'] as $editor ) {
    269270                    printf(
    270271                        '<li><a href="https://profiles.wordpress.org/%s/">%s %s</a></li>',
     
    276277                ?>
    277278            </ul>
    278         </div>
    279     <?php endif; ?>
     279            <?php
     280        else :
     281            ?>
     282            <p>There are no editors for this specific project, yet. <a href="https://make.wordpress.org/polyglots/handbook/rosetta/theme-plugin-directories/">Become an editor.</a></p>
     283            <?php
     284        endif;
     285
     286        if ( $locale_contributors['editors']['inherited'] ) :
     287            ?>
     288            <hr>
     289            <p>The following users can edit translations for either a parent project or all projects.</p>
     290            <ul class="compressed">
     291                <?php
     292                foreach ( $locale_contributors['editors']['inherited'] as $editor ) {
     293                    printf(
     294                        '<li><a href="https://profiles.wordpress.org/%s/">%s %s</a></li>',
     295                        $editor->nicename,
     296                        get_avatar( $editor->email, 15 ),
     297                        $editor->display_name ? $editor->display_name : $editor->nicename
     298                    );
     299                }
     300                ?>
     301            </ul>
     302            <?php
     303        endif;
     304        ?>
     305    </div>
    280306</div>
    281307
Note: See TracChangeset for help on using the changeset viewer.