I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.

Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2016-11-21 01:22:32 +00:00
parent 5b97952cab
commit 4cf5550d8d
17 changed files with 65 additions and 17 deletions

View File

@@ -28,12 +28,16 @@ do_action( 'rss_tag_pre', 'atom-comments' );
?>
>
<title type="text"><?php
if ( is_singular() )
if ( is_singular() ) {
/* translators: Comments feed title. 1: Post title */
printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
elseif ( is_search() )
} elseif ( is_search() ) {
/* translators: Comments feed title. 1: Site name, 2: Search query */
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
else
} else {
/* translators: Comments feed title. 1: Site name */
printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
}
?></title>
<subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
@@ -73,8 +77,10 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
$title = get_the_title($comment_post->ID);
/** This filter is documented in wp-includes/feed.php */
$title = apply_filters( 'the_title_rss', $title );
/* translators: Individual comment title. 1: Post title, 2: Comment author name */
printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
} else {
/* translators: Comment author title. 1: Comment author name */
printf(ent2ncr(__('By: %s')), get_comment_author_rss());
}
?></title>

View File

@@ -33,12 +33,16 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
>
<channel>
<title><?php
if ( is_singular() )
if ( is_singular() ) {
/* translators: Comments feed title. 1: Post title */
printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
elseif ( is_search() )
} elseif ( is_search() ) {
/* translators: Comments feed title. 1: Site name, 2: Search query */
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
else
} else {
/* translators: Comments feed title. 1: Site name */
printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
}
?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
@@ -72,8 +76,10 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
$title = get_the_title($comment_post->ID);
/** This filter is documented in wp-includes/feed.php */
$title = apply_filters( 'the_title_rss', $title );
/* translators: Individual comment title. 1: Post title, 2: Comment author name */
printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
} else {
/* translators: Comment author title. 1: Comment author name */
printf(ent2ncr(__('By: %s')), get_comment_author_rss());
}
?></title>

View File

@@ -4087,6 +4087,7 @@ function _doing_it_wrong( $function, $message, $version ) {
$message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
__( 'https://codex.wordpress.org/Debugging_in_WordPress' )
);
/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
} else {
if ( is_null( $version ) ) {

View File

@@ -128,6 +128,7 @@ function wp_check_php_mysql_versions() {
$protocol = wp_get_server_protocol();
header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
header( 'Content-Type: text/html; charset=utf-8' );
/* translators: 1: Current PHP version number, 2: WordPress version number, 3: Minimum required PHP version number */
die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
}

View File

@@ -846,7 +846,8 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $us
* @param array $meta By default, contains the requested privacy setting and lang_id.
*/
apply_filters( 'wpmu_signup_blog_notification_subject',
__( '[%1$s] Activate %2$s' ),
/* translators: New site notification email subject. 1: Network name, 2: New site URL */
_x( '[%1$s] Activate %2$s', 'New site notification email subject' ),
$domain, $path, $title, $user_login, $user_email, $key, $meta
),
$from_name,
@@ -939,7 +940,8 @@ function wpmu_signup_user_notification( $user_login, $user_email, $key, $meta =
* @param array $meta Signup meta data.
*/
apply_filters( 'wpmu_signup_user_notification_subject',
__( '[%1$s] Activate %2$s' ),
/* translators: New user notification email subject. 1: Network name, 2: New user login */
_x( '[%1$s] Activate %2$s', 'New user notification email subject' ),
$user_login, $user_email, $key, $meta
),
$from_name,
@@ -1202,6 +1204,7 @@ function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
$siteurl = site_url();
restore_current_blog();
/* translators: New site notification email. 1: Site URL, 2: User IP address, 3: Settings screen URL */
$msg = sprintf( __( 'New Site: %1$s
URL: %2$s
Remote IP: %3$s
@@ -1244,6 +1247,7 @@ function newuser_notify_siteadmin( $user_id ) {
$user = get_userdata( $user_id );
$options_site_url = esc_url(network_admin_url('settings.php'));
/* translators: New user notification email. 1: User login, 2: User IP address, 3: Settings screen URL */
$msg = sprintf(__('New User: %1$s
Remote IP: %2$s
@@ -1523,6 +1527,9 @@ We hope you enjoy your new site. Thanks!
if ( empty( $current_network->site_name ) )
$current_network->site_name = 'WordPress';
/* translators: New site notification email subject. 1: Network name, 2: New site name */
$subject = __( 'New %1$s Site: %2$s' );
/**
* Filters the subject of the welcome email after site activation.
*
@@ -1530,7 +1537,7 @@ We hope you enjoy your new site. Thanks!
*
* @param string $subject Subject of the email.
*/
$subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_network->site_name, wp_unslash( $title ) ) );
$subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) );
wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
if ( $switched_locale ) {
@@ -1608,6 +1615,9 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
if ( empty( $current_network->site_name ) )
$current_network->site_name = 'WordPress';
/* translators: New user notification email subject. 1: Network name, 2: New user login */
$subject = __( 'New %1$s User: %2$s' );
/**
* Filters the subject of the welcome email after user activation.
*
@@ -1615,7 +1625,7 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
*
* @param string $subject Subject of the email.
*/
$subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_network->site_name, $user->user_login) );
$subject = apply_filters( 'update_welcome_user_subject', sprintf( $subject, $current_network->site_name, $user->user_login) );
wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
if ( $switched_locale ) {

View File

@@ -1626,6 +1626,7 @@ function wp_notify_moderator($comment_id) {
'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
$notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n";
/* translators: Comment moderation notification email subject. 1: Site name, 2: Post title */
$subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
$message_headers = '';

View File

@@ -289,6 +289,7 @@ function wp_default_scripts( &$scripts ) {
'upload_limit_exceeded' => __('You may only upload 1 file.'),
'http_error' => __('HTTP error.'),
'upload_failed' => __('Upload failed.'),
/* translators: 1: Opening link tag, 2: Closing link tag */
'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'),
'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'),
'io_error' => __('IO error.'),

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-beta4-39322';
$wp_version = '4.7-beta4-39323';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@@ -1364,10 +1364,13 @@ class wpdb {
wp_load_translations_early();
if ( $caller = $this->get_caller() )
if ( $caller = $this->get_caller() ) {
/* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */
$error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
else
} else {
/* translators: 1: Database error message, 2: SQL query */
$error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
}
error_log( $error_str );
@@ -3213,8 +3216,10 @@ class wpdb {
public function check_database_version() {
global $wp_version, $required_mysql_version;
// Make sure the server has the required MySQL version
if ( version_compare($this->db_version(), $required_mysql_version, '<') )
if ( version_compare($this->db_version(), $required_mysql_version, '<') ) {
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number */
return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
}
}
/**