Skip to content

Commit

Permalink
Translate: Explicitely exclude patterns from make-core-pot more f…
Browse files Browse the repository at this point in the history
…irmly by ignoring the `wp-content` directory entirely for these admin contexts.

It appears that the command does not fully respect the `exclude` parameter if it believes there are strings that should be included. By excluding a higher-level directory, it never see's the potential included `patterns` folder.

Ensures that strings from Twenty Twenty-Two are not included in POT files for wp-admin.

Previously: [11809].
See wp-cli/i18n-command#312 (review)


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11810 74240141-8908-4e6f-9713-ba540dce6ec7
  • Loading branch information
dd32 committed May 3, 2022
1 parent 0532510 commit bf0e8a1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __invoke( $args, $assoc_args ) {
];

$command_assoc_args = [
'exclude' => 'patterns',
'exclude' => 'patterns,wp-content',
'include' => 'wp-admin/includes/continents-cities.php',
'package-name' => self::PACKAGE_NAME,
'headers' => $headers,
Expand Down Expand Up @@ -195,7 +195,7 @@ public function __invoke( $args, $assoc_args ) {
}

$admin_exclude = [
'patterns',
'patterns', 'wp-content',
'wp-admin/includes/continents-cities.php',
// External libraries.
'wp-admin/includes/class-ftp*',
Expand Down Expand Up @@ -246,7 +246,7 @@ public function __invoke( $args, $assoc_args ) {
];

$command_assoc_args = [
'exclude' => 'patterns',
'exclude' => 'patterns,wp-content',
'include' => implode( ',', $admin_network_files ),
'subtract' => sprintf( '%1$s/wordpress.pot,%1$s/wordpress-admin.pot', $this->destination ),
'subtract-and-merge' => true,
Expand Down

0 comments on commit bf0e8a1

Please sign in to comment.