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
Built from https://develop.svn.wordpress.org/trunk@43595


git-svn-id: http://core.svn.wordpress.org/trunk@43424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
jrf 2018-08-30 12:14:24 +00:00
parent 998d381fa0
commit c952f8f98f
3 changed files with 13 additions and 6 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43594';
$wp_version = '5.0-alpha-43595';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -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 */
__( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
__( '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 */
__( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
__( 'https://codex.wordpress.org/Cookies' )
)

View File

@ -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 '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>';
if ( $errors->has_errors() ) {
echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
}
?>
<p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ); ?></p>
<p>
<?php
/* translators: %s: Current user's display name. */
printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name );
?>
</p>
<?php
$blogs = get_blogs_of_user( $current_user->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 */
'<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
'<strong>' . $newblog . '</strong>'
);
} else { /* translators: %s: site address */
} else {
printf(
/* translators: %s: site address */
'<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
'<strong>' . $newblog . '</strong>'
);