From b8d32950e763354a4d40693eb3d740acb3f8956a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 29 Sep 2017 11:09:13 +0000 Subject: [PATCH] I18N: Improve i18n in help text for Custom HTML widget and Additional CSS section. Fixes #42032. git-svn-id: https://develop.svn.wordpress.org/trunk@41639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 13 ++++++------- .../widgets/class-wp-widget-custom-html.php | 11 +++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 85e225138e..e81c92cc51 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -4614,7 +4614,7 @@ final class WP_Customize_Manager { $section_description = '

'; $section_description .= __( 'Add your own CSS code here to customize the appearance and layout of your site.' ); $section_description .= sprintf( - ' %2$s%3$s', + ' %2$s %3$s', esc_url( __( 'https://codex.wordpress.org/CSS' ) ), __( 'Learn more about CSS' ), /* translators: accessibility text */ @@ -4632,12 +4632,11 @@ final class WP_Customize_Manager { if ( 'false' !== wp_get_current_user()->syntax_highlighting ) { $section_description .= '

'; $section_description .= sprintf( - /* translators: placeholder is link to user profile */ - __( 'The edit field automatically highlights code syntax. You can disable this in your %s to work in plain text mode.' ), - sprintf( - ' %2$s%3$s', - esc_url( get_edit_profile_url() ), - __( 'user profile' ), + /* translators: 1: link to user profile, 2: additional link attributes, 3: accessibility text */ + __( 'The edit field automatically highlights code syntax. You can disable this in your user profile%3$s to work in plain text mode.' ), + esc_url( get_edit_profile_url() ), + 'class="external-link" target="_blank"', + sprintf( ' %s', /* translators: accessibility text */ __( '(opens in a new window)' ) ) diff --git a/src/wp-includes/widgets/class-wp-widget-custom-html.php b/src/wp-includes/widgets/class-wp-widget-custom-html.php index ad6ce956db..8c4e838e05 100644 --- a/src/wp-includes/widgets/class-wp-widget-custom-html.php +++ b/src/wp-includes/widgets/class-wp-widget-custom-html.php @@ -257,12 +257,11 @@ class WP_Widget_Custom_HTML extends WP_Widget { if ( 'false' !== wp_get_current_user()->syntax_highlighting ) { $content .= '

'; $content .= sprintf( - /* translators: placeholder is link to user profile */ - __( 'The edit field automatically highlights code syntax. You can disable this in your %s to work in plain text mode.' ), - sprintf( - ' %2$s%3$s', - esc_url( get_edit_profile_url() ), - __( 'user profile' ), + /* translators: 1: link to user profile, 2: additional link attributes, 3: accessibility text */ + __( 'The edit field automatically highlights code syntax. You can disable this in your user profile%3$s to work in plain text mode.' ), + esc_url( get_edit_profile_url() ), + 'class="external-link" target="_blank"', + sprintf( ' %s', /* translators: accessibility text */ __( '(opens in a new window)' ) )