From 72c0d63d05cfb38ad90de19eb4f07395f9bb6768 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 10 Jun 2016 15:53:27 +0000 Subject: [PATCH] I18N: Simplify the WordPress update notice for translators. * Make codex URL and accessibility text separate strings. * Add translator comments. Props ramiy for initial patch. Fixes #35721. git-svn-id: https://develop.svn.wordpress.org/trunk@37675 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 28a12f42b8..4f6b06d5a5 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -230,10 +230,30 @@ function update_nag() { if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) return false; - if ( current_user_can('update_core') ) { - $msg = sprintf( __( 'WordPress %1$s is available! Please update now.' ), $cur->current, network_admin_url( 'update-core.php' ) ); + if ( current_user_can( 'update_core' ) ) { + $msg = sprintf( + /* translators: 1: Codex URL to release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */ + __( 'WordPress %2$s is available! Please update now.' ), + sprintf( + /* translators: %s: WordPress version */ + esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ), + $cur->current + ), + $cur->current, + network_admin_url( 'update-core.php' ), + esc_attr__( 'Please update WordPress now' ) + ); } else { - $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); + $msg = sprintf( + /* translators: 1: Codex URL to release notes, 2: new WordPress version */ + __( 'WordPress %2$s is available! Please notify the site administrator.' ), + sprintf( + /* translators: %s: WordPress version */ + esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ), + $cur->current + ), + $cur->current + ); } echo "
$msg
"; }