Conversation
This is needed to support plugin and theme commands
Activating a language is a global action per site. One cannot activate language X for plugin A and language Y for plugin B.
It needs to be called by a subclass
Shouldn't we rather have a
Yes, that would be useful. Maybe we should also add a sort of
Yes, I still maintain that WP-CLI should be completely explicit about what it does and what it doesn't do. |
This sounds reasonable and I think can be worked on in a separate PR. I'll create a new issue for this.
I think I'll create a separate issue for this as well.
This would result in the following commands:
What about one command that does all of the above, e.g. |
|
Looks like the cache for plugin and theme languages isn't working. Ugh. |
There are no available updates.
When testing on trunk, Twenty Ten is always available and cannot be installed. By switching to an `is-installed` test we can circumvent this.
|
Great progress on this @swissspidy ! I'm going to take the liberty of pushing: Update test framework to latest. Use Add test for Fix Just on the |
|
Create a new issue for the dry run message discussion: #25 |
Add plugin and theme command
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