From 5a7a3bb9245ca84467d36c7a1a96129c0dbd10af Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 1 Mar 2016 02:14:25 +0000 Subject: [PATCH] I18N: Move the `aria-label` text in `comment_form()` to a separate string for easier translation. Add translator comments. Props ramiy. Fixes #36014. Built from https://develop.svn.wordpress.org/trunk@36794 git-svn-id: http://core.svn.wordpress.org/trunk@36761 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 16 ++++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 54df8b91c0..09093569f7 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2145,9 +2145,21 @@ function comment_form( $args = array(), $post_id = null ) { 'fields' => $fields, 'comment_field' => '

', /** This filter is documented in wp-includes/link-template.php */ - 'must_log_in' => '

' . sprintf( __( 'You must be logged in to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', + 'must_log_in' => '

' . sprintf( + /* translators: %s: login URL */ + __( 'You must be logged in to post a comment.' ), + wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) + ) . '

', /** This filter is documented in wp-includes/link-template.php */ - 'logged_in_as' => '

' . sprintf( __( 'Logged in as %2$s. Log out?' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', + 'logged_in_as' => '

' . sprintf( + /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */ + __( 'Logged in as %3$s. Log out?' ), + get_edit_user_link(), + /* translators: %s: user name */ + esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), + $user_identity, + wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) + ) . '

', 'comment_notes_before' => '

' . __( 'Your email address will not be published.' ) . ''. ( $req ? $required_text : '' ) . '

', 'comment_notes_after' => '', 'id_form' => 'commentform', diff --git a/wp-includes/version.php b/wp-includes/version.php index 95c7b11516..2fd4ca93bd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta1-36793'; +$wp_version = '4.5-beta1-36794'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.