Coding Standards: Add missing translator comments.

Twentys Eleven, Sixteen, and Seventeen now have translator comments for all their strings.

Also, WPCS now doesn't show missing translator comment warnings for test files.

See #47632.


Built from https://develop.svn.wordpress.org/trunk@45604


git-svn-id: http://core.svn.wordpress.org/trunk@45415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-07-05 08:04:57 +00:00
parent 14c7533162
commit 28a8f31ffa
37 changed files with 150 additions and 39 deletions

View File

@ -21,15 +21,20 @@ get_header(); ?>
<header class="page-header">
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
<?php endif; ?>
<?php
if ( is_day() ) {
/* translators: %s: date */
printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' );
} elseif ( is_month() ) {
/* translators: %s: date */
printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' );
} elseif ( is_year() ) {
/* translators: %s: date */
printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' );
} else {
_e( 'Blog Archives', 'twentyeleven' );
}
?>
</h1>
</header>

View File

@ -26,7 +26,12 @@ get_header(); ?>
?>
<header class="page-header">
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
<h1 class="page-title author">
<?php
/* translators: %s: author display name */
printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
?>
</h1>
</header>
<?php
@ -58,7 +63,12 @@ get_header(); ?>
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: author display name */
printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
?>
</h2>
<?php the_author_meta( 'description' ); ?>
</div><!-- #author-description -->
</div><!-- #author-info -->

View File

@ -17,6 +17,7 @@ get_header(); ?>
<header class="page-header">
<h1 class="page-title">
<?php
/* translators: %s: category title */
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?>
</h1>

View File

@ -35,8 +35,10 @@ global $feature_class;
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( '' != $tag_list ) {
/* translators: 1: category list, 2: tag list, 3: post permalink, 4: post title */
$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 {
/* translators: 1: category list, 3: post permalink, 4: post title */
$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
}
printf(

View File

@ -46,7 +46,9 @@
<p><em>
<?php
printf(
/* translators: 1: link attributes, 2: number of photos */
_n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ),
/* translators: %s: Post title */
'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
);
@ -75,6 +77,7 @@
?>
<span class="cat-links">
<?php
/* translators: 1: CSS classes, 2: list of categories */
printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true;
?>
@ -90,6 +93,7 @@
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php
/* translators: 1: CSS classes, 2: list of tags */
printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true;
?>

View File

@ -41,11 +41,13 @@
<div class="entry-meta">
<?php
printf(
/* translators: 1: the permalink, 2: date and time, 3: date and time, 4: author link, 5: author link title, 6: author display name */
__( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven' ),
esc_url( get_permalink() ),
get_the_date( 'c' ),
get_the_date(),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: %s: author display name */
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
get_the_author()
);
@ -58,7 +60,10 @@
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 ); ?>
<?php
/* translators: 1: CSS classes, 2: category list */
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
@ -67,7 +72,10 @@
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 ); ?>
<?php
/* translators: 1: CSS classes, 2: tag list */
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 ?>

View File

@ -53,6 +53,7 @@
?>
<span class="cat-links">
<?php
/* translators: 1: CSS classes, 2: list of categories */
printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true;
?>
@ -68,6 +69,7 @@
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php
/* translators: 1: CSS classes, 2: list of tags */
printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true;
?>

View File

@ -39,10 +39,13 @@
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( '' != $tag_list ) {
/* translators: 1: categories list, 2: tag list, 3: permalink, 4: post title, 5: author name, 6: author URL */
$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' );
} elseif ( '' != $categories_list ) {
/* translators: 1: categories list, 2: tag list, 3: permalink, 4: post title, 5: author name, 6: author URL */
$utility_text = __( 'This entry was posted in %1$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 {
/* translators: 1: categories list, 2: tag list, 3: permalink, 4: post title, 5: author name, 6: author URL */
$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
}
@ -67,11 +70,19 @@
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: %s: author name */
printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
?>
</h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
<?php
/* translators: %s: author name */
printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() );
?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->

View File

@ -60,6 +60,7 @@
?>
<span class="cat-links">
<?php
/* translators: 1: CSS classes, 2: category list */
printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true;
?>
@ -77,6 +78,7 @@
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php
/* translators: 1: CSS classes, 2: tag list */
printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true;
?>

View File

@ -32,7 +32,10 @@
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>">
<?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?>
<?php
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' );
?>
</a>
</div>
</footer><!-- #colophon -->

View File

@ -726,8 +726,8 @@ if ( ! function_exists( 'twentyeleven_comment' ) ) :
echo get_avatar( $comment, $avatar_size );
/* translators: 1: comment author, 2: date and time */
printf(
/* translators: 1: comment author, 2: date and time */
__( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
sprintf(
@ -784,12 +784,14 @@ if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
*/
function twentyeleven_posted_on() {
printf(
/* translators: 1: The permalink, 2: time, 3: date and time, 4: date and time, 5: Author posts, 6: Author post link text, 7: Author display name */
__( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: %s: Author display name */
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
get_the_author()
);

View File

@ -42,6 +42,7 @@ if ( $site_description && ( is_home() || is_front_page() ) ) {
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
/* translators: %s: page number */
echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) );
}

View File

@ -31,6 +31,7 @@ get_header(); ?>
<?php
$metadata = wp_get_attachment_metadata();
printf(
/* translators: 1: time, 2: date, 3: image permalink, 4: image width, 5: image height, 6: parent permalink, 7: parent post title, 8: parent post title */
__( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentyeleven' ),
esc_attr( get_the_time() ),
get_the_date(),

View File

@ -302,7 +302,12 @@ function twentyeleven_settings_field_link_color() {
<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" />
<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
<br />
<span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span>
<span>
<?php
/* translators: link color */
printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' );
?>
</span>
<?php
}
@ -338,7 +343,12 @@ function twentyeleven_theme_options_render_page() {
<div class="wrap">
<?php screen_icon(); ?>
<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name ); ?></h2>
<h2>
<?php
/* translators: theme name */
printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name );
?>
</h2>
<?php settings_errors(); ?>
<form method="post" action="options.php">

View File

@ -15,7 +15,12 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<h1 class="page-title">
<?php
/* translators: %s: search query */
printf( __( 'Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' );
?>
</h1>
</header>
<?php twentyeleven_content_nav( 'nav-above' ); ?>

View File

@ -124,8 +124,11 @@ get_header(); ?>
} else {
$thumbnail_size = 'small-feature';
}
/* translators: %s: post title */
$title = sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) );
?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $title ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a>
<?php
}
?>
@ -156,8 +159,11 @@ get_header(); ?>
} else {
$class = '';
}
/* translators: %s: post title */
$title = sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) );
?>
<li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li>
<li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( $title ); ?>"<?php echo $class; ?>></a></li>
<?php endwhile; ?>
</ul>
</nav>

View File

@ -17,6 +17,7 @@ get_header(); ?>
<header class="page-header">
<h1 class="page-title">
<?php
/* translators: %s: tag title */
printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' );
?>
</h1>

View File

@ -36,6 +36,7 @@ add_action( 'after_switch_theme', 'twentyseventeen_switch_theme' );
* @global string $wp_version WordPress version.
*/
function twentyseventeen_upgrade_notice() {
/* translators: %s: The current WordPress version */
$message = sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] );
printf( '<div class="error"><p>%s</p></div>', $message );
}
@ -49,6 +50,7 @@ function twentyseventeen_upgrade_notice() {
*/
function twentyseventeen_customize() {
wp_die(
/* translators: %s: The current WordPress version */
sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ),
'',
array(
@ -67,6 +69,7 @@ add_action( 'load-customize.php', 'twentyseventeen_customize' );
*/
function twentyseventeen_preview() {
if ( isset( $_GET['preview'] ) ) {
/* translators: %s: The current WordPress version */
wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ) );
}
}

View File

@ -148,7 +148,8 @@ function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
wp_reset_postdata();
} elseif ( is_customize_preview() ) {
// The output placeholder anchor.
echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . $id . '" id="panel' . $id . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Front Page Section %1$s Placeholder', 'twentyseventeen' ), $id ) . '</span></article>';
/* translators: %s: The section id */
echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . $id . '" id="panel' . $id . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Front Page Section %s Placeholder', 'twentyseventeen' ), $id ) . '</span></article>';
}
}

View File

@ -16,7 +16,12 @@ get_header(); ?>
<header class="page-header">
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<h1 class="page-title">
<?php
/* translators: search query */
printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' );
?>
</h1>
<?php else : ?>
<h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1>
<?php endif; ?>

View File

@ -16,6 +16,9 @@
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?>
<?php
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' );
?>
</a>
</div><!-- .site-info -->

View File

@ -39,9 +39,9 @@ global $twentyseventeencounter;
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -36,9 +36,9 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -78,9 +78,9 @@
if ( is_single() || empty( $audio ) ) {
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -65,9 +65,9 @@
if ( is_single() || ! get_post_gallery() ) {
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -55,9 +55,9 @@
if ( is_single() || '' === get_the_post_thumbnail() ) {
// Only show content if is a single post, or if there's no featured image.
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -21,7 +21,12 @@
if ( is_home() && current_user_can( 'publish_posts' ) ) :
?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<p>
<?php
/* translators: %s: Link to post-new.php */
printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) );
?>
</p>
<?php else : ?>

View File

@ -77,9 +77,9 @@
if ( is_single() || empty( $video ) ) {
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -51,9 +51,9 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)

View File

@ -58,7 +58,10 @@
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?>
<?php
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' );
?>
</a>
</div><!-- .site-info -->
</footer><!-- .site-footer -->

View File

@ -38,6 +38,7 @@ add_action( 'after_switch_theme', 'twentysixteen_switch_theme' );
* @global string $wp_version WordPress version.
*/
function twentysixteen_upgrade_notice() {
/* translators: %s: The current WordPress version */
$message = sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] );
printf( '<div class="error"><p>%s</p></div>', $message );
}
@ -51,6 +52,7 @@ function twentysixteen_upgrade_notice() {
*/
function twentysixteen_customize() {
wp_die(
/* translators: %s: The current WordPress version */
sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ),
'',
array(
@ -69,6 +71,7 @@ add_action( 'load-customize.php', 'twentysixteen_customize' );
*/
function twentysixteen_preview() {
if ( isset( $_GET['preview'] ) ) {
/* translators: %s: The current WordPress version */
wp_die( sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ) );
}
}

View File

@ -49,6 +49,7 @@ if ( ! function_exists( 'twentysixteen_entry_meta' ) ) :
if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
/* translators: %s: Name of current post */
comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
echo '</span>';
}

View File

@ -15,7 +15,12 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentysixteen' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h1>
<h1 class="page-title">
<?php
/* translators: %s: The search query */
printf( __( 'Search Results for: %s', 'twentysixteen' ), '<span>' . esc_html( get_search_query() ) . '</span>' );
?>
</h1>
</header><!-- .page-header -->
<?php

View File

@ -30,7 +30,10 @@
<p class="author-bio">
<?php the_author_meta( 'description' ); ?>
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s', 'twentysixteen' ), get_the_author() ); ?>
<?php
/* translators: %s: The post author display name */
printf( __( 'View all posts by %s', 'twentysixteen' ), get_the_author() );
?>
</a>
</p><!-- .author-bio -->
</div><!-- .author-description -->

View File

@ -16,7 +16,12 @@
<div class="page-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentysixteen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<p>
<?php
/* translators: %s: Link to post-new.php */
printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentysixteen' ), esc_url( admin_url( 'post-new.php' ) ) );
?>
</p>
<?php elseif ( is_search() ) : ?>

View File

@ -23,9 +23,9 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content(
sprintf(
/* translators: %s: Name of current post */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
get_the_title()
)

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45603';
$wp_version = '5.3-alpha-45604';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.