Skip to content

Commit bf0e8a1

Browse files
committed
Translate: Explicitely exclude patterns from make-core-pot more firmly 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
1 parent 0532510 commit bf0e8a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-make-core-pot.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __invoke( $args, $assoc_args ) {
7272
];
7373

7474
$command_assoc_args = [
75-
'exclude' => 'patterns',
75+
'exclude' => 'patterns,wp-content',
7676
'include' => 'wp-admin/includes/continents-cities.php',
7777
'package-name' => self::PACKAGE_NAME,
7878
'headers' => $headers,
@@ -195,7 +195,7 @@ public function __invoke( $args, $assoc_args ) {
195195
}
196196

197197
$admin_exclude = [
198-
'patterns',
198+
'patterns', 'wp-content',
199199
'wp-admin/includes/continents-cities.php',
200200
// External libraries.
201201
'wp-admin/includes/class-ftp*',
@@ -246,7 +246,7 @@ public function __invoke( $args, $assoc_args ) {
246246
];
247247

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

0 commit comments

Comments
 (0)