wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 12 forks source link

Add option to create POT file without updating the Git repo #79

Closed swissspidy closed 5 years ago

swissspidy commented 6 years ago

For the times where you know the cached repository is up-to-date so you don't want to unnecessarily run git reset and git pull, just good old wp i18n make-pot on it.

This could be done by adding a --cached flag to UpdateCommand and passing that as an argument to \Required\Traduttore\Runner::run(). In that case that method would simply call \Required\Traduttore\Loader::get_local_path() instead of \Required\Traduttore\Loader::download().

And if \Required\Traduttore\Loader::get_local_path() returns null you know a cached repository doesn't exist and can throw an error in the terminal accordingly.

grappler commented 6 years ago

@swissspidy I can't fully understand why you do not want git reset and git pull to run. It is time or performance or keeping changes?

swissspidy commented 6 years ago

For example when you know the source code is already up to date or when working locally without internet connection. Running the commands would be unnecessary in that case.

grappler commented 6 years ago

I am not sure I see the need as the tool with mostly be used in production and not locally. 🤷‍♂️

swissspidy commented 6 years ago

For debugging it's helpful IMO :-)