Make WordPress Core


Ignore:
Timestamp:
12/28/2018 01:52:31 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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

Add a missing sprintf() for npm install substring.

See #44492.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/index.php

    r44360 r44366  
    3131
    3232// Die with an error message
    33 $die = sprintf(
    34     /* translators: %1$s: WordPress */
    35     __( 'You are running %1$s without JavaScript and CSS files. These need to be built.' ),
    36     'WordPress'
     33$die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
     34
     35$die .= '<p>' . sprintf(
     36    /* translators: %s: npm install */
     37    __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running %s.' ),
     38    '<code style="color: green;">npm install</code>'
    3739) . '</p>';
    3840
    39 $die .= '<p>' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running ' );
    40 $die .= '<code style="color: green;">npm install</code>.</p>';
    41 
    4241$die .= '<ul>';
    43 $die .= '<li>' . sprintf(
    44     /* translators: %s: WordPress */
    45         __( 'To build %s while developing run:' ),
    46     'WordPress'
    47 ) . '<br /><br />';
     42$die .= '<li>' . __( 'To build WordPress while developing, run:' ) . '<br /><br />';
    4843$die .= '<code style="color: green;">grunt build --dev</code></li>';
    49 $die .= '<li>' . sprintf(
    50     __( 'To build files automatically when changing the source files run:' ),
    51     'WordPress'
    52 ) . '<br /><br />';
     44$die .= '<li>' . __( 'To build files automatically when changing the source files, run:' ) . '<br /><br />';
    5345$die .= '<code style="color: green;">grunt watch</code></li>';
    54 $die .= '<li>' . sprintf(
    55     __( 'To create a production build of %s run:' ),
    56     'WordPress'
    57 ) . '<br /><br />';
     46$die .= '<li>' . __( 'To create a production build of WordPress, run:' ) . '<br /><br />';
    5847$die .= '<code style="color: green;">grunt build</code></li>';
    5948$die .= '</ul>';
    6049
    61 
    6250$die .= '<p>' . sprintf(
    63     /* translators: %1$s: NPM URL, %2$s: Grunt URL */
    64         __( '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>.' ),
     51    /* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */
     52    __( '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>.' ),
    6553    'https://www.npmjs.com/',
    6654    'https://gruntjs.com/',
Note: See TracChangeset for help on using the changeset viewer.