From 8e9ff015b93d4965d455c76a9e510be5f519aada Mon Sep 17 00:00:00 2001 From: sanketio Date: Wed, 4 Mar 2026 12:11:54 +0530 Subject: [PATCH] I18N: Add missing translator comments and fix misplaced comment --- src/wp-includes/class-wp-phpmailer.php | 7 +++++++ src/wp-includes/pluggable.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-phpmailer.php b/src/wp-includes/class-wp-phpmailer.php index 34747d295da6e..69fdae51d1828 100644 --- a/src/wp-includes/class-wp-phpmailer.php +++ b/src/wp-includes/class-wp-phpmailer.php @@ -38,6 +38,7 @@ public function __construct( $exceptions = false ) { */ public static function setLanguage( $langcode = 'en', $lang_path = '' ) { static::$language = array( + /* translators: SMTP authentication error message. */ 'authenticate' => __( 'SMTP Error: Could not authenticate.' ), 'buggy_php' => sprintf( /* translators: 1: mail.add_x_header. 2: php.ini */ @@ -45,8 +46,11 @@ public static function setLanguage( $langcode = 'en', $lang_path = '' ) { 'mail.add_x_header', 'php.ini' ), + /* translators: SMTP connection error message. */ 'connect_host' => __( 'SMTP Error: Could not connect to SMTP host.' ), + /* translators: SMTP data transmission error message. */ 'data_not_accepted' => __( 'SMTP Error: Data not accepted.' ), + /* translators: Email message body is empty. */ 'empty_message' => __( 'Message body empty' ), /* translators: There is a space after the colon. */ 'encoding' => __( 'Unknown encoding: ' ), @@ -79,6 +83,7 @@ public static function setLanguage( $langcode = 'en', $lang_path = '' ) { 'smtp_code' => __( 'SMTP code: ' ), /* translators: There is a space after the colon. */ 'smtp_code_ex' => __( 'Additional SMTP info: ' ), + /* translators: connect() is a PHP function name and should not be translated. */ 'smtp_connect_failed' => __( 'SMTP connect() failed.' ), /* translators: There is a space after the colon. */ 'smtp_detail' => __( 'Detail: ' ), @@ -86,7 +91,9 @@ public static function setLanguage( $langcode = 'en', $lang_path = '' ) { 'smtp_error' => __( 'SMTP server error: ' ), /* translators: There is a space after the colon. */ 'variable_set' => __( 'Cannot set or reset variable: ' ), + /* translators: SMTPUTF8 is a protocol extension name and should not be translated. */ 'no_smtputf8' => __( 'Server does not support SMTPUTF8 needed to send to Unicode addresses' ), + /* translators: PHP IMAP is a PHP extension name. RFC822 is an email standard name. Both should not be translated. */ 'imap_recommended' => __( 'Using simplified address parser is not recommended. Install the PHP IMAP extension for full RFC822 parsing.' ), /* translators: %s: $useimap */ 'deprecated_argument' => sprintf( __( 'Argument %s is deprecated' ), '$useimap' ), diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 03593ea3e64e6..c5d87a0e48f92 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -1937,11 +1937,11 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) { break; } - /* translators: %s: Comment URL. */ if ( 'note' === $comment->comment_type ) { $notify_message .= get_edit_post_link( $comment->comment_post_ID, 'url' ) . "\r\n"; } else { $notify_message .= get_permalink( $comment->comment_post_ID ) . "#comments\r\n\r\n"; + /* translators: %s: Comment URL. */ $notify_message .= sprintf( __( 'Permalink: %s' ), get_comment_link( $comment ) ) . "\r\n"; }