From 436a4adb606fd93762988fae2ba6f8c3c4c8a7ce Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 1 Mar 2016 02:13:48 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@36794 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 54df8b91c0..09093569f7 100644 --- a/src/wp-includes/comment-template.php +++ b/src/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',