From c42d10fe46a8efac460cd51f3e11a9e23dde84a2 Mon Sep 17 00:00:00 2001 From: James K Date: Tue, 13 Feb 2024 00:13:23 -0500 Subject: [PATCH 1/3] Update MakePotCommand.php Resolves #383 --- src/MakePotCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index 7fe9940..e8dce93 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -628,7 +628,7 @@ protected function extract_strings() { if ( $this->main_file_path && $this->location ) { $translation->addReference( - str_replace( "$this->source/", '', $this->main_file_path ) + str_replace( "$this->source/", '', wp_normalize_path( $this->main_file_path ) ) ); } From cf65115736874a5249cef6d57b223bd6b3873968 Mon Sep 17 00:00:00 2001 From: James K Date: Tue, 13 Feb 2024 00:22:11 -0500 Subject: [PATCH 2/3] not in the webapp anymore... --- src/MakePotCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index e8dce93..b5adb5d 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -628,7 +628,7 @@ protected function extract_strings() { if ( $this->main_file_path && $this->location ) { $translation->addReference( - str_replace( "$this->source/", '', wp_normalize_path( $this->main_file_path ) ) + str_replace( "$this->source/", '', Utils\normalize_path( $this->main_file_path ) ) ); } From 5b196fdb6f0d2a2bc2fa35a395f447eba342c22d Mon Sep 17 00:00:00 2001 From: James K Date: Tue, 13 Feb 2024 08:35:58 -0500 Subject: [PATCH 3/3] Review Co-authored-by: Pascal Birchler --- src/MakePotCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index b5adb5d..3b5b914 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -628,7 +628,7 @@ protected function extract_strings() { if ( $this->main_file_path && $this->location ) { $translation->addReference( - str_replace( "$this->source/", '', Utils\normalize_path( $this->main_file_path ) ) + ltrim( str_replace( "$this->source/", '', Utils\normalize_path( $this->main_file_path ) ), '/' ) ); }