From be38b14e05e5c7a0a67b7a4b64afa8288c6257c6 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 10 Jun 2016 15:54:30 +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. Built from https://develop.svn.wordpress.org/trunk@37675 git-svn-id: http://core.svn.wordpress.org/trunk@37641 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update.php | 26 +++++++++++++++++++++++--- wp-includes/version.php | 2 +- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 28a12f42b8..4f6b06d5a5 100644 --- a/wp-admin/includes/update.php +++ b/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
"; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 70ce3cb9a8..019792b74a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37674'; +$wp_version = '4.6-alpha-37675'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.