Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

wp-pot : email in options causes script in package.json to fail #256

Open
IonTulbure opened this issue Mar 20, 2023 · 1 comment
Open

wp-pot : email in options causes script in package.json to fail #256

IonTulbure opened this issue Mar 20, 2023 · 1 comment

Comments

@IonTulbure
Copy link

IonTulbure commented Mar 20, 2023

Describe the bug
I am using this Wordpress Plugin Boilerplate https://github.com/wp-strap/wordpress-plugin-boilerplate .

package.json has this translate script based on wp-pot:

"translate": "wp-pot --src '**/**/**/*.php' --dest-file 'languages/test-plugin.pot' --package 'test-plugin' --domain 'test-plugin' --last-translator 'Test Plugin <[email protected]>' --team 'Test Plugin <[email protected]>' --bug-report 'testplugin.com'"

When i run yarn translate i get the following error:

yarn run v1.22.19
$ wp-pot --src '**/**/**/*.php' --dest-file 'languages/test-plugin.pot' --package 'test-plugin' --domain 'test-plugin' --last-translator 'Test Plugin <[email protected]>' --team 'Test Plugin <[email protected]>' --bug-report 'testplugin.com'
The system cannot find the file specified.
error Command failed with exit code 1.

To Reproduce
run yarn translate (wp-pot)

This will throw the following error:
The system cannot find the file specified.
error Command failed with exit code 1.

Module versions
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]

Additional context
What can cause this issue, can't find anything related to it.

Without email (<[email protected]> for example) in --teams & --last-translator options it works :
translate": "wp-pot --src '**/**/**/*.php' --dest-file 'languages/test-plugin.pot' --package 'test-plugin' --domain 'test-plugin' --bug-report 'testplugin.com' --team 'Test Plugin' --last-translator 'Test Plugin'"

@IonTulbure
Copy link
Author

IonTulbure commented Mar 20, 2023

@rasmusbe Hi, sorry for disturbing. Can you help ?

"translate": "wp-pot --src '**/**/**/*.php' --dest-file 'languages/test-plugin.pot' --package 'test-plugin' --domain 'test-plugin' --bug-report 'testplugin.com' --team 'Test Plugin \"<[email protected]>\"' --last-translator 'Test Plugin \"<[email protected]>\"'" - this works.

Do we need to escape less and greater signs < & > in order to use email in --team & --last-translator for use in package.json script ?

@IonTulbure IonTulbure changed the title wp-pot : email in options causes script to fail wp-pot : email in options causes script in package.json to fail Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant