Build Tools: Remove unnecessary sprintf() in translatable strings.

Add a missing `sprintf()` for `npm install` substring.

See #44492.

git-svn-id: https://develop.svn.wordpress.org/trunk@44366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-12-28 13:52:31 +00:00
parent a68bcf5227
commit f2db5d2bb2
2 changed files with 21 additions and 45 deletions

View File

@ -30,37 +30,25 @@ wp_check_php_mysql_versions();
wp_load_translations_early();
// Die with an error message
$die = sprintf(
/* translators: %1$s: WordPress */
__( 'You are running %1$s without JavaScript and CSS files. These need to be built.' ),
'WordPress'
$die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
$die .= '<p>' . sprintf(
/* translators: %s: npm install */
__( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running %s.' ),
'<code style="color: green;">npm install</code>'
) . '</p>';
$die .= '<p>' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running ' );
$die .= '<code style="color: green;">npm install</code>.</p>';
$die .= '<ul>';
$die .= '<li>' . sprintf(
/* translators: %s: WordPress */
__( 'To build %s while developing run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To build WordPress while developing, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt build --dev</code></li>';
$die .= '<li>' . sprintf(
__( 'To build files automatically when changing the source files run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To build files automatically when changing the source files, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt watch</code></li>';
$die .= '<li>' . sprintf(
__( 'To create a production build of %s run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To create a production build of WordPress, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt build</code></li>';
$die .= '</ul>';
$die .= '<p>' . sprintf(
/* translators: %1$s: NPM URL, %2$s: Grunt URL */
/* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
'https://www.npmjs.com/',
'https://gruntjs.com/',

View File

@ -30,38 +30,26 @@ wp_check_php_mysql_versions();
wp_load_translations_early();
// Die with an error message
$die = sprintf(
/* translators: %1$s: WordPress */
__( 'You are running %1$s without JavaScript and CSS files. These need to be built.' ),
'WordPress'
$die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
$die .= '<p>' . sprintf(
/* translators: %s: npm install */
__( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running %s.' ),
'<code style="color: green;">npm install</code>'
) . '</p>';
$die .= '<p>' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running ' );
$die .= '<code style="color: green;">npm install</code>.</p>';
$die .= '<ul>';
$die .= '<li>' . sprintf(
/* translators: %s: WordPress */
__( 'To build %s while developing run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To build WordPress while developing, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt build --dev</code></li>';
$die .= '<li>' . sprintf(
__( 'To build files automatically when changing the source files run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To build files automatically when changing the source files, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt watch</code></li>';
$die .= '<li>' . sprintf(
__( 'To create a production build of %s run:' ),
'WordPress'
) . '<br /><br />';
$die .= '<li>' . __( 'To create a production build of WordPress, run:' ) . '<br /><br />';
$die .= '<code style="color: green;">grunt build</code></li>';
$die .= '</ul>';
$die .= '<p>' . sprintf(
/* translators: %1$s: NPM URL, %2$s: Grunt URL */
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
/* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
'https://www.npmjs.com/',
'https://gruntjs.com/',
__( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )