From 7839cf651f320615e7ec774dafdaa7d28624af2c Mon Sep 17 00:00:00 2001 From: jrf Date: Thu, 30 Aug 2018 12:13:53 +0000 Subject: [PATCH] I18n: Improve translators comments [1]. * Add missing translators comments. * Fix placement of some translators comments. Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments. Patch `44360-src.2.diff` of the series. Props garyj, alvarogois, michielatyoast See #44360 git-svn-id: https://develop.svn.wordpress.org/trunk@43595 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 4 ++-- src/wp-signup.php | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index 745dbc343a..a14c2dd171 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -941,10 +941,10 @@ switch ( $action ) { if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) { if ( headers_sent() ) { - /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */ $user = new WP_Error( 'test_cookie', sprintf( + /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */ __( 'ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.' ), __( 'https://codex.wordpress.org/Cookies' ), __( 'https://wordpress.org/support/' ) @@ -952,10 +952,10 @@ switch ( $action ) { ); } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) { // If cookies are disabled we can't log in even with a valid user+pass - /* translators: %s: Browser cookie documentation URL */ $user = new WP_Error( 'test_cookie', sprintf( + /* translators: %s: Browser cookie documentation URL */ __( 'ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.' ), __( 'https://codex.wordpress.org/Cookies' ) ) diff --git a/src/wp-signup.php b/src/wp-signup.php index 2e1fe05f56..933ff3f342 100644 --- a/src/wp-signup.php +++ b/src/wp-signup.php @@ -323,13 +323,19 @@ function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) { $blog_title = $filtered_results['blog_title']; $errors = $filtered_results['errors']; + /* translators: %s: Network's site name. */ echo '

' . sprintf( __( 'Get another %s site in seconds' ), get_network()->site_name ) . '

'; if ( $errors->has_errors() ) { echo '

' . __( 'There was a problem, please correct the form below and try again.' ) . '

'; } ?> -

add another site to your account. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' ), $current_user->display_name ); ?>

+

+ add another site to your account. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' ), $current_user->display_name ); + ?> +

ID ); @@ -955,13 +961,14 @@ if ( $active_signup == 'none' ) { $newblog = get_blogaddress_by_name( $newblogname ); if ( $active_signup == 'blog' || $active_signup == 'all' ) { - /* translators: %s: site address */ printf( + /* translators: %s: site address */ '

' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '

', '' . $newblog . '' ); - } else { /* translators: %s: site address */ + } else { printf( + /* translators: %s: site address */ '

' . __( 'The site you were looking for, %s, does not exist.' ) . '

', '' . $newblog . '' );