From aa846b33685d51c1d4766935f7ab971ca55eb65b Mon Sep 17 00:00:00 2001 From: saasfreelancer Date: Tue, 14 May 2024 14:25:21 +0500 Subject: [PATCH] refactor: Use relative paths for file header references windows fix Ref: * https://github.com/wp-cli/i18n-command/pull/384 * https://github.com/wp-cli/i18n-command/issues/383 --- src/MakePotCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index affce87..f3e84de 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -630,7 +630,7 @@ protected function extract_strings() { if ( $this->main_file_path && $this->location ) { $translation->addReference( - ltrim( str_replace( "$this->source/", '', Utils\normalize_path( $this->main_file_path ) ), '/' ) + ltrim( str_replace( Utils\normalize_path( "$this->source/" ), '', Utils\normalize_path( $this->main_file_path ) ), '/' ) ); }