Making WordPress.org

Changeset 8640


Ignore:
Timestamp:
04/16/2019 07:04:32 AM (6 years ago)
Author:
ocean90
Message:

Translate: Extract JavaScript translations from admin files for WordPress 5.2+.

See #3748.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-make-core-pot.php

    r7810 r8640  
    5252            WP_CLI::error( 'Unsupported WordPress version. Use makepot.php.' );
    5353        }
    54 
    55         $extract_js = version_compare( $wp_version, '5.0-beta', '>=' );
    5654
    5755        $dry_run = Utils\get_flag_value( $assoc_args, 'dry-run', false );
     
    114112        $command .= ' --ignore-domain';
    115113
    116         if ( ! $extract_js ) {
     114        if ( version_compare( $wp_version, '5.0-beta', '<' ) ) {
    117115            $command .= ' --skip-js';
    118116        }
     
    161159        $command .= ' --headers=' . escapeshellarg( $headers );
    162160        $command .= ' --file-comment=' . escapeshellarg( $file_comment );
    163         $command .= ' --skip-js'; // TODO: No use of wp.i18n, yet.
    164         $command .= ' --skip-audit';
    165         $command .= ' --ignore-domain';
     161        $command .= ' --skip-audit';
     162        $command .= ' --ignore-domain';
     163
     164        if ( version_compare( $wp_version, '5.2-beta', '<' ) ) {
     165            $command .= ' --skip-js';
     166        }
    166167
    167168        WP_CLI::line( $command );
Note: See TracChangeset for help on using the changeset viewer.