Add language plugin and language theme command.#29
Conversation
|
See also #27 Edit: ah, made a bags of this. |
language plugin and language theme command.
|
@schlessera I thought there were still some things missing, hence the revert in #28? Or do you want to work on that in future iterations? |
|
Well, you made some changes, and it looked complete to me. Are there things you think are missing/incomplete/broken? |
|
#27 seems important, as I just had that issue without knowing what was going on. |
|
What does not work as we had initially discussed is that operations like But I think of these are limitations of the infrastructure that we cannot easily get around, aren't they? |
|
Ah. I'll try to test this locally. Maybe we can find a workaround if that's still an issue. It would be great to have this documented in the tests somehow. |
Add plugin and theme command.
Closes #24
Restored from #21 after revert #28
Original @swissspidy:
This fixes #24 (originally wp-cli/wp-cli#3782).
Things that still needs to be done/decided, among others:
Decide whetherThe answer is no. Activating a language should be separate.wp language plugin install hello-dolly en_GBwould accept an--activateflag.Activating a language is a global action per site. One cannot activate language X for plugin A and language Y for plugin B. Hence, I think only the core command should allow activating languages.
uninstallcommands.\WP_CLI\CommandWithTranslation::uninstall()currently respects the object type, but doesn't know about the plugin/theme slug.updatecommands.\WP_CLI\CommandWithTranslation::update()currently updates all translations.Shouldwp language core updateonly update translations for core andwp language plugin updatefor plugins (or a specific plugin?).The answer is yes. If someone wants to update all files, they can use something like
for type in core plugin theme; do wp language $type update; done