mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Twenty Eleven: make categories and tags i18n friendly; Props dimadin; Fixes #17531
git-svn-id: http://svn.automattic.com/wordpress/trunk@18029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5a2ea7d13
commit
ef03662627
@ -34,7 +34,8 @@ global $feature_class;
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php
|
||||
$tag_list = get_the_tag_list( '', ', ' );
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( '' != $tag_list ) {
|
||||
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
|
||||
} else {
|
||||
@ -42,7 +43,8 @@ global $feature_class;
|
||||
}
|
||||
printf(
|
||||
$utility_text,
|
||||
get_the_category_list( ', ' ),
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
get_the_category_list( __( ', ', 'twentyeleven' ) ),
|
||||
$tag_list,
|
||||
get_permalink(),
|
||||
the_title_attribute( 'echo=0' )
|
||||
|
@ -65,13 +65,35 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyeleven' ); ?></span> <?php the_category( ', ' ); ?></span>
|
||||
<?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>' ); ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
|
@ -50,11 +50,27 @@
|
||||
?>
|
||||
</div><!-- .entry-meta -->
|
||||
<div class="entry-meta">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __( 'Tagged', 'twentyeleven' ) . '</span> ', ', ', '</span>' ); ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ): ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -50,14 +50,36 @@
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php if ( 'post' == $post->post_type ) : // Hide category and tag text for pages on Search ?>
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyeleven' ); ?></span> <?php the_category( ', ' ); ?></span>
|
||||
<?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>' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
<?php endif; // End if 'post' == $post->post_type ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
|
@ -33,7 +33,8 @@
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php
|
||||
$tag_list = get_the_tag_list( '', ', ' );
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( '' != $tag_list ) {
|
||||
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
|
||||
} else {
|
||||
@ -41,7 +42,8 @@
|
||||
}
|
||||
printf(
|
||||
$utility_text,
|
||||
get_the_category_list( ', ' ),
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
get_the_category_list( __( ', ', 'twentyeleven' ) ),
|
||||
$tag_list,
|
||||
get_permalink(),
|
||||
the_title_attribute( 'echo=0' ),
|
||||
|
@ -54,14 +54,36 @@
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php if ( 'post' == $post->post_type ) : // Hide category and tag text for pages on Search ?>
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyeleven' ); ?></span> <?php the_category( ', ' ); ?></span>
|
||||
<?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>' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
<?php endif; // End if 'post' == $post->post_type ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
|
Loading…
Reference in New Issue
Block a user