Make WordPress Core


Ignore:
Timestamp:
05/25/2011 03:19:33 PM (15 years ago)
Author:
iandstewart
Message:

Twenty Eleven: make categories and tags i18n friendly; Props dimadin; Fixes #17531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/content-gallery.php

    r17959 r18029  
    6666
    6767        <footer class="entry-meta">
    68                 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyeleven' ); ?></span> <?php the_category( ', ' ); ?></span>
    69                 <?php the_tags( '<span class="sep"> | </span> <span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __( 'Tagged', 'twentyeleven' ) . '</span> ', ', ', '</span>' ); ?>
     68                <?php
     69                        /* translators: used between list items, there is a space after the comma */
     70                        $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
     71                        if ( $categories_list ):
     72                ?>
     73                <span class="cat-links">
     74                        <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
     75                        $show_sep = true; ?>
     76                </span>
     77                <?php endif; // End if categories ?>
     78                <?php
     79                        /* translators: used between list items, there is a space after the comma */
     80                        $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
     81                        if ( $tags_list ):
     82                        if ( $show_sep ) : ?>
     83                <span class="sep"> | </span>
     84                        <?php endif; // End if $show_sep ?>
     85                <span class="tag-links">
     86                        <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
     87                        $show_sep = true; ?>
     88                </span>
     89                <?php endif; // End if $tags_list ?>
    7090
    7191                <?php if ( comments_open() ) : ?>
     92                <?php if ( $show_sep ) : ?>
    7293                <span class="sep"> | </span>
     94                <?php endif; // End if $show_sep ?>
    7395                <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    74                 <?php endif; ?>
     96                <?php endif; // End if comments_open() ?>
    7597
    7698                <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
Note: See TracChangeset for help on using the changeset viewer.