From f2db5d2bb25f90067e52ac7337caa2722d57695e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 28 Dec 2018 13:52:31 +0000 Subject: [PATCH] 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 --- src/index.php | 32 ++++++++++---------------------- src/wp-admin/index.php | 34 +++++++++++----------------------- 2 files changed, 21 insertions(+), 45 deletions(-) diff --git a/src/index.php b/src/index.php index 9510b83e2f..379d063f60 100644 --- a/src/index.php +++ b/src/index.php @@ -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.' ) . '

'; + +$die .= '

' . 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.' ), + 'npm install' ) . '

'; -$die .= '

' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running ' ); -$die .= 'npm install.

'; - $die .= ''; - $die .= '

' . sprintf( - /* translators: %1$s: NPM URL, %2$s: Grunt URL */ + /* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */ __( 'This requires NPM and Grunt. Read more about setting up your local development environment.' ), 'https://www.npmjs.com/', 'https://gruntjs.com/', diff --git a/src/wp-admin/index.php b/src/wp-admin/index.php index 3bc73fa827..190b85db2f 100644 --- a/src/wp-admin/index.php +++ b/src/wp-admin/index.php @@ -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.' ) . '

'; + +$die .= '

' . 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.' ), + 'npm install' ) . '

'; -$die .= '

' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running ' ); -$die .= 'npm install.

'; - $die .= ''; - $die .= '

' . sprintf( - /* translators: %1$s: NPM URL, %2$s: Grunt URL */ - __( 'This requires NPM and Grunt. Read more about setting up your local development environment.' ), + /* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */ + __( 'This requires NPM and Grunt. Read more about setting up your local development environment.' ), 'https://www.npmjs.com/', 'https://gruntjs.com/', __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )