From 5bba77964644ba9a7b8ab9cb12c1fbe26cd230f4 Mon Sep 17 00:00:00 2001 From: Khokan Sardar Date: Fri, 22 May 2026 17:47:01 +0530 Subject: [PATCH 1/2] I18N: Add missing translator comments for strings with trailing spaces. Add translator comments for translatable strings that include a trailing space after the colon, following the established pattern in WP_PHPMailer. See #64899. --- src/wp-includes/category-template.php | 1 + src/wp-includes/pluggable.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index cd8304f24fdc0..9fb43af76358d 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1230,6 +1230,7 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $post_id = 0 ) */ function the_tags( $before = null, $sep = ', ', $after = '' ) { if ( null === $before ) { + /* translators: There is a space after the colon. */ $before = __( 'Tags: ' ); } diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index fd659b600c379..98b9c40173cdf 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2086,6 +2086,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; + /* translators: There is a space after the colon. */ $notify_message .= __( 'Trackback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; break; @@ -2097,6 +2098,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; + /* translators: There is a space after the colon. */ $notify_message .= __( 'Pingback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; break; From 64589162caf26649aeee1b8966bbc10bdd0e02e6 Mon Sep 17 00:00:00 2001 From: Khokan Sardar Date: Sat, 23 May 2026 11:15:10 +0530 Subject: [PATCH 2/2] I18N: Move trailing spaces out of translatable strings. Address review feedback by moving the space after the colon outside of the translatable strings in the_tags() and wp_notify_moderator(). See #64899. --- src/wp-includes/category-template.php | 3 +-- src/wp-includes/pluggable.php | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 9fb43af76358d..76409d0832f2e 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1230,8 +1230,7 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $post_id = 0 ) */ function the_tags( $before = null, $sep = ', ', $after = '' ) { if ( null === $before ) { - /* translators: There is a space after the colon. */ - $before = __( 'Tags: ' ); + $before = __( 'Tags:' ) . ' '; } $the_tags = get_the_tag_list( $before, $sep, $after ); diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 98b9c40173cdf..ced5fae127a99 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2086,8 +2086,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; - /* translators: There is a space after the colon. */ - $notify_message .= __( 'Trackback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; + $notify_message .= __( 'Trackback excerpt:' ) . ' ' . "\r\n" . $comment_content . "\r\n\r\n"; break; case 'pingback': @@ -2098,8 +2097,7 @@ function wp_notify_moderator( $comment_id ) { $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; /* translators: %s: Trackback/pingback/comment author URL. */ $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; - /* translators: There is a space after the colon. */ - $notify_message .= __( 'Pingback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n"; + $notify_message .= __( 'Pingback excerpt:' ) . ' ' . "\r\n" . $comment_content . "\r\n\r\n"; break; default: // Comments.