Changeset 11768 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-theme-directory/inc/language-pack/class-build-listener.php
- Timestamp:
- 04/12/2022 06:52:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-theme-directory/inc/language-pack/class-build-listener.php
r8156 r11768 47 47 48 48 // Build in a separate process. 49 $cmd = WPORGTRANSLATE_WPCLI . ' wporg-translate language-pack generate theme ' . escapeshellarg( $args['theme'] ) . ' 2>&1'; 49 $cmd = WPORGTRANSLATE_WPCLI . ' wporg-translate language-pack generate theme ' . escapeshellarg( $args['theme'] ) . ' 2>&1'; 50 $output = []; 51 $return_var = 0; 50 52 exec( $cmd, $output, $return_var ); 53 $output = array_filter( $output, fn( $line ) => ! str_ends_with( $line, ', no translations.' ) ); 51 54 if ( $return_var ) { 52 $message .= "\tFailure: " . implode( "\n\t", $output ) . "\n";55 $message .= 'Failure: ' . implode( "\n", $output ) . "\n"; 53 56 } else { 54 $message .= "\t" . implode( "\n\t", $output ) . "\n";57 $message .= implode( "\n", $output ) . "\n"; 55 58 } 56 59 57 $message .= "Language packs for {$args['theme']} processed.\n"; 60 $message = trim( $message ); 61 if ( ! $message ) { 62 $message = "No language packs for {$args['theme']} generated."; 63 } 58 64 59 65 $attachment = [
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)