Commit d18685a632 for wordpress.org

commit d18685a63250cbc8a2c1efab8915ea9ce0920ea0
Author: swissspidy <swissspidy@git.wordpress.org>
Date:   Wed Nov 25 10:54:56 2026 +0000

    I18N: Place translator comments directly before their strings.

    Some translator comments were placed in front of a ternary operator or shared a line with several translatable strings. String extraction tools either miss such comments or attach them to the wrong string. This moves each comment directly before the gettext call it describes.

    Developed in: https://github.com/WordPress/wordpress-develop/pull/16069

    Props swissspidy, mukesh27.
    See #66747.
    Built from https://develop.svn.wordpress.org/trunk@65774


    git-svn-id: http://core.svn.wordpress.org/trunk@64803 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php
index b3aaad1ad9..e39f332e7f 100644
--- a/wp-admin/includes/deprecated.php
+++ b/wp-admin/includes/deprecated.php
@@ -1386,10 +1386,15 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
 		$raw_title = $item->get_title();

 		$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
+		$install_label = sprintf(
+			/* translators: %s: Plugin name. */
+			_x( 'Install %s', 'plugin' ),
+			$raw_title
+		);
+
 		echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
 			'&nbsp;<a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
-			/* translators: %s: Plugin name. */
-			esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
+			esc_attr( $install_label ) . '">(' . __( 'Install' ) . ')</a></li>';

 		$feed->__destruct();
 		unset( $feed );
diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php
index e7b02a2a62..60d84a54da 100644
--- a/wp-admin/includes/update.php
+++ b/wp-admin/includes/update.php
@@ -385,8 +385,11 @@ function update_right_now_message() {
 			$msg .= sprintf(
 				'<a href="%s" class="button" aria-describedby="wp-version">%s</a>',
 				network_admin_url( 'update-core.php' ),
-				/* translators: %s: WordPress version number, or 'Latest' string. */
-				sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) )
+				sprintf(
+					/* translators: %s: WordPress version number, or 'Latest' string. */
+					__( 'Update to %s' ),
+					$cur->current ? $cur->current : __( 'Latest' )
+				)
 			);
 		}
 	}
diff --git a/wp-includes/class-wp-object-cache.php b/wp-includes/class-wp-object-cache.php
index 443af49e31..0ac9e10dcd 100644
--- a/wp-includes/class-wp-object-cache.php
+++ b/wp-includes/class-wp-object-cache.php
@@ -154,10 +154,15 @@ class WP_Object_Cache {
 			wp_load_translations_early();
 		}

-		$message = is_string( $key )
-			? __( 'Cache key must not be an empty string.' )
-			/* translators: %s: The type of the given cache key. */
-			: sprintf( __( 'Cache key must be an integer or a non-empty string, %s given.' ), $type );
+		if ( is_string( $key ) ) {
+			$message = __( 'Cache key must not be an empty string.' );
+		} else {
+			$message = sprintf(
+				/* translators: %s: The type of the given cache key. */
+				__( 'Cache key must be an integer or a non-empty string, %s given.' ),
+				$type
+			);
+		}

 		_doing_it_wrong(
 			sprintf( '%s::%s', __CLASS__, debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 )[1]['function'] ),
diff --git a/wp-includes/class-wp-taxonomy.php b/wp-includes/class-wp-taxonomy.php
index f44ce34a11..d563a2c438 100644
--- a/wp-includes/class-wp-taxonomy.php
+++ b/wp-includes/class-wp-taxonomy.php
@@ -633,8 +633,12 @@ final class WP_Taxonomy {
 			'filter_by_item'             => array( null, __( 'Filter by category' ) ),
 			'items_list_navigation'      => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
 			'items_list'                 => array( __( 'Tags list' ), __( 'Categories list' ) ),
-			/* translators: Tab heading when selecting from the most used terms. */
-			'most_used'                  => array( _x( 'Most Used', 'tags' ), _x( 'Most Used', 'categories' ) ),
+			'most_used'                  => array(
+				/* translators: Tab heading when selecting from the most used terms. */
+				_x( 'Most Used', 'tags' ),
+				/* translators: Tab heading when selecting from the most used terms. */
+				_x( 'Most Used', 'categories' ),
+			),
 			'back_to_items'              => array( __( '&larr; Go to Tags' ), __( '&larr; Go to Categories' ) ),
 			'item_link'                  => array(
 				_x( 'Tag Link', 'navigation link block title' ),
diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php
index f432b45ab4..85dc55bce5 100644
--- a/wp-includes/class-wp-theme-json.php
+++ b/wp-includes/class-wp-theme-json.php
@@ -5860,9 +5860,18 @@ class WP_Theme_JSON {
 				break;
 			}

+			if ( $below_midpoint_count === $steps_mid_point - 1 ) {
+				$name = __( 'Small' );
+			} else {
+				$name = sprintf(
+					/* translators: %s: Digit to indicate multiple of sizing, eg. 2X-Small. */
+					__( '%sX-Small' ),
+					(string) $x_small_count
+				);
+			}
+
 			$below_sizes[] = array(
-				/* translators: %s: Digit to indicate multiple of sizing, eg. 2X-Small. */
-				'name' => $below_midpoint_count === $steps_mid_point - 1 ? __( 'Small' ) : sprintf( __( '%sX-Small' ), (string) $x_small_count ),
+				'name' => $name,
 				'slug' => (string) $slug,
 				'size' => round( $current_step, 2 ) . $unit,
 			);
@@ -5897,9 +5906,18 @@ class WP_Theme_JSON {
 				? $current_step + $spacing_scale['increment']
 				: ( $spacing_scale['increment'] >= 1 ? $current_step * $spacing_scale['increment'] : $current_step / $spacing_scale['increment'] );

+			if ( 0 === $above_midpoint_count ) {
+				$name = __( 'Large' );
+			} else {
+				$name = sprintf(
+					/* translators: %s: Digit to indicate multiple of sizing, eg. 2X-Large. */
+					__( '%sX-Large' ),
+					(string) $x_large_count
+				);
+			}
+
 			$above_sizes[] = array(
-				/* translators: %s: Digit to indicate multiple of sizing, eg. 2X-Large. */
-				'name' => 0 === $above_midpoint_count ? __( 'Large' ) : sprintf( __( '%sX-Large' ), (string) $x_large_count ),
+				'name' => $name,
 				'slug' => (string) $slug,
 				'size' => round( $current_step, 2 ) . $unit,
 			);
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 640ab86e06..8e8f885f87 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -1930,8 +1930,11 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) :
 					$notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
 					/* translators: %s: Note author email. */
 					$notify_message .= sprintf( __( 'Email: %s' ), $comment_author_email ) . "\r\n";
-					/* translators: %s: Note text. */
-					$notify_message .= sprintf( __( 'Note: %s' ), "\r\n" . ( empty( $comment_content ) ? __( 'resolved/reopened' ) : $comment_content ) ) . "\r\n\r\n";
+					$notify_message .= sprintf(
+						/* translators: %s: Note text. */
+						__( 'Note: %s' ),
+						"\r\n" . ( empty( $comment_content ) ? __( 'resolved/reopened' ) : $comment_content )
+					) . "\r\n\r\n";
 					$notify_message .= __( 'You can see all notes on this post here:' ) . "\r\n";
 					/* translators: Note notification email subject. 1: Site title, 2: Post title. */
 					$subject = sprintf( __( '[%1$s] Note: "%2$s"' ), $blogname, $post->post_title );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index b731baadea..0ec234872e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.3-alpha-65773';
+$wp_version = '7.3-alpha-65774';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.