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
This commit is contained in:
Dominik Schilling 2016-06-10 15:54:30 +00:00
parent 47d26cd9fb
commit be38b14e05
2 changed files with 24 additions and 4 deletions

View File

@ -231,9 +231,29 @@ function update_nag() {
return false;
if ( current_user_can( 'update_core' ) ) {
$msg = sprintf( __( '<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s" aria-label="Please update WordPress now">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) );
$msg = sprintf(
/* translators: 1: Codex URL to release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
__( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
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( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
$msg = sprintf(
/* translators: 1: Codex URL to release notes, 2: new WordPress version */
__( '<a href="%1$s">WordPress %2$s</a> 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 "<div class='update-nag'>$msg</div>";
}

View File

@ -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.