From 8b1ecf68d98f901a7c9ae3b1a5968707636017dd Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 15 Apr 2019 22:38:59 +0000 Subject: [PATCH] I18N: Improvements to and additions of translator comments for various email subject strings. Props ramiy Fixes #46920 git-svn-id: https://develop.svn.wordpress.org/trunk@45204 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-automatic-updater.php | 10 +++++----- src/wp-admin/includes/file.php | 1 + src/wp-admin/includes/misc.php | 1 + src/wp-admin/user-new.php | 2 ++ src/wp-includes/ms-functions.php | 1 + src/wp-includes/pluggable.php | 6 +++--- src/wp-includes/user.php | 4 ++-- src/wp-login.php | 2 +- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index 4a05e9868f..7fad10d6ff 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -648,18 +648,18 @@ class WP_Automatic_Updater { switch ( $type ) { case 'success': // We updated. - /* translators: 1: Site name, 2: WordPress version number. */ + /* translators: Site updated notification email subject. 1: Site title, 2: WordPress version number. */ $subject = __( '[%1$s] Your site has updated to WordPress %2$s' ); break; case 'fail': // We tried to update but couldn't. case 'manual': // We can't update (and made no attempt). - /* translators: 1: Site name, 2: WordPress version number. */ + /* translators: Updated available notification email subject. 1: Site title, 2: WordPress version number. */ $subject = __( '[%1$s] WordPress %2$s is available. Please update!' ); break; case 'critical': // We tried to update, started to copy files, then things went wrong. - /* translators: 1: Site name. */ + /* translators: Site down notification email subject. 1: Site title. */ $subject = __( '[%1$s] URGENT: Your site may be down due to a failed update' ); break; @@ -911,10 +911,10 @@ Thanks! -- The WordPress Team" ); $body[] = ''; - /* translators: Background update failed notification email subject. %s: site title */ + /* translators: Background update failed notification email subject. %s: Site title */ $subject = sprintf( __( '[%s] Background Update Failed' ), $site_title ); } else { - /* translators: Background update finished notification email subject. %s: site title */ + /* translators: Background update finished notification email subject. %s: Site title */ $subject = sprintf( __( '[%s] Background Update Finished' ), $site_title ); } diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 2018f831b3..0cb68f9164 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -2423,6 +2423,7 @@ All at ###SITENAME### $mail_success = wp_mail( $email_address, sprintf( + /* translators: Personal data export notification email subject. %s: Site title */ __( '[%s] Personal Data Export' ), $site_name ), diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index b14aad3b24..0dcebdfedb 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1289,6 +1289,7 @@ All at ###SITENAME### $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $content ); $content = str_replace( '###SITEURL###', home_url(), $content ); + /* translators: New admin email address notification email subject. %s: Site title */ wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content ); if ( $switched_locale ) { diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php index a63a329d6d..6f38312c9e 100644 --- a/src/wp-admin/user-new.php +++ b/src/wp-admin/user-new.php @@ -122,6 +122,8 @@ You\'ve been invited to join \'%1$s\' at Please click the following link to confirm the invite: %4$s' ); + + /* translators: Joining confirmation notification email subject. %s: Site title */ wp_mail( $new_user_email, sprintf( __( '[%s] Joining Confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) ); if ( $switched_locale ) { diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index d27f71954c..dc774a399d 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -2645,6 +2645,7 @@ All at ###SITENAME### $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ), $content ); $content = str_replace( '###SITEURL###', network_home_url(), $content ); + /* translators: Email change notification email subject. %s: Network title */ wp_mail( $value, sprintf( __( '[%s] Network Admin Email Change Request' ), wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ) ), $content ); if ( $switched_locale ) { diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index f9cd4736c4..777dfbef1f 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -1535,7 +1535,7 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) : /* translators: %s: comment text */ $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n"; - /* translators: 1: blog name, 2: post title */ + /* translators: Trackback notification email subject. 1: Site title, 2: Post title */ $subject = sprintf( __( '[%1$s] Trackback: "%2$s"' ), $blogname, $post->post_title ); break; case 'pingback': @@ -1548,7 +1548,7 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) : /* translators: %s: comment text */ $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n"; - /* translators: 1: blog name, 2: post title */ + /* translators: Pingback notification email subject. 1: Site title, 2: Post title */ $subject = sprintf( __( '[%1$s] Pingback: "%2$s"' ), $blogname, $post->post_title ); break; default: // Comments @@ -1563,7 +1563,7 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) : /* translators: %s: comment text */ $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n"; - /* translators: 1: blog name, 2: post title */ + /* translators: Comment notification email subject. 1: Site title, 2: Post title */ $subject = sprintf( __( '[%1$s] Comment: "%2$s"' ), $blogname, $post->post_title ); break; } diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 9696789dd5..3819f21f6f 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3085,7 +3085,7 @@ All at ###SITENAME### $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content ); $subject = sprintf( - /* translators: 1: Site name. 2: Name of the confirmed action. */ + /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */ __( '[%1$s] Action Confirmed: %2$s' ), $email_data['sitename'], $action_description @@ -3497,7 +3497,7 @@ All at ###SITENAME### $content = str_replace( '###SITENAME###', $email_data['sitename'], $content ); $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content ); - /* translators: Privacy data request subject. 1: Site name, 2: Name of the action */ + /* translators: Confirm privacy data request notification email subject. 1: Site title, 2: Name of the action */ $subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $email_data['sitename'], $email_data['description'] ); /** diff --git a/src/wp-login.php b/src/wp-login.php index a2929ce2a5..d9b2554783 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -395,7 +395,7 @@ function retrieve_password() { $message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n"; $message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">\r\n"; - /* translators: Password reset email subject. %s: Site name */ + /* translators: Password reset notification email subject. %s: Site title */ $title = sprintf( __( '[%s] Password Reset' ), $site_name ); /**