wp-cli / language-command

Installs, activates, and manages language packs.
MIT License
13 stars 21 forks source link

Add `--format` flag to `language core|plugin|theme` #88

Open RoundAboutWEB opened 5 years ago

RoundAboutWEB commented 5 years ago

grafik

All update commands for language files with "- json" generate an error.

wp language core update --dry-run --json
wp language plugin update --all --dry-run --json
wp language theme update --all --dry-run --json
wp language core update --json
wp language plugin update --all --json
wp language theme update --all --json
schlessera commented 5 years ago

There's two things happening here: a.) --json is a deprecated flag that was later replaced by the more generic --format=json, as we also support other formats by now. WP-CLI automatically turns --json into --format=json for backward compatibility. b.) The above three commands don't support a --format flag, so the error just tells you that you're using an unknown flag for these commands.

So the behavior of WP-CLI is correct here, even if it might be slightly misleading due to backward compatibility logic.

As to whether we would want to add --format support to these commands, it would help to know what specific use case you are trying to solve.

RoundAboutWEB commented 4 years ago

json is needed to see if any updates are pending

RoundAboutWEB commented 4 years ago

Is there any hope that this case (reported September 2019) will be handled?

schlessera commented 4 years ago

It is not a current priority.

Are you interested in looking into this for creating a PR? If so, I'm happy to assist you in whatever way I can to get this implemented.