From 364759ecb2813bad2b49c2195a2b16f4801e2c88 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 Jul 2020 21:23:26 +0000 Subject: [PATCH] I18N: Mark the strings with plugin and theme names in email notifications for translation. Follow-up to [48517]. See #50350. git-svn-id: https://develop.svn.wordpress.org/trunk@48519 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-automatic-updater.php | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index ba38ec95b3..f19697007f 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -1045,7 +1045,12 @@ class WP_Automatic_Updater { $body[] = __( 'These plugins failed to update:' ); foreach ( $failed_updates['plugin'] as $item ) { - $body[] = "- {$item->name} version {$item->item->new_version}"; + $body[] = sprintf( + /* translators: 1: Plugin name, 2: Version number. */ + __( '- %1$s version %2$s' ), + $item->name, + $item->item->new_version + ); $past_failure_emails[ $item->item->plugin ] = $item->item->new_version; } @@ -1058,7 +1063,12 @@ class WP_Automatic_Updater { $body[] = __( 'These themes failed to update:' ); foreach ( $failed_updates['theme'] as $item ) { - $body[] = "- {$item->name} version {$item->item->new_version}"; + $body[] = sprintf( + /* translators: 1: Theme name, 2: Version number. */ + __( '- %1$s version %2$s' ), + $item->name, + $item->item->new_version + ); $past_failure_emails[ $item->item->theme ] = $item->item->new_version; } @@ -1076,7 +1086,12 @@ class WP_Automatic_Updater { $body[] = __( 'These plugins are now up to date:' ); foreach ( $successful_updates['plugin'] as $item ) { - $body[] = "- {$item->name} version {$item->item->new_version}"; + $body[] = sprintf( + /* translators: 1: Plugin name, 2: Version number. */ + __( '- %1$s version %2$s' ), + $item->name, + $item->item->new_version + ); unset( $past_failure_emails[ $item->item->plugin ] ); } @@ -1089,7 +1104,12 @@ class WP_Automatic_Updater { $body[] = __( 'These themes are now up to date:' ); foreach ( $successful_updates['theme'] as $item ) { - $body[] = "- {$item->name} version {$item->item->new_version}"; + $body[] = sprintf( + /* translators: 1: Theme name, 2: Version number. */ + __( '- %1$s version %2$s' ), + $item->name, + $item->item->new_version + ); unset( $past_failure_emails[ $item->item->theme ] ); }