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
This commit is contained in:
Dominik Schilling (ocean90) 2016-06-10 15:53:27 +00:00
parent db0195c936
commit 72c0d63d05
1 changed files with 23 additions and 3 deletions

View File

@ -230,10 +230,30 @@ function update_nag() {
if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
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' ) );
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 */
__( '<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>";
}