Skip to content

Add language plugin and language theme command.#29

Merged
schlessera merged 9 commits intomasterfrom
wip-plugin-theme-command
Aug 2, 2018
Merged

Add language plugin and language theme command.#29
schlessera merged 9 commits intomasterfrom
wip-plugin-theme-command

Conversation

@gitlost
Copy link
Copy Markdown
Contributor

@gitlost gitlost commented Jan 25, 2018

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 whether wp language plugin install hello-dolly en_GB would accept an --activate flag.
    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.
    The answer is no. Activating a language should be separate.
  • Implement uninstall commands.
    \WP_CLI\CommandWithTranslation::uninstall() currently respects the object type, but doesn't know about the plugin/theme slug.
  • Implement update commands.
    \WP_CLI\CommandWithTranslation::update() currently updates all translations.
    Should wp language core update only update translations for core and wp language plugin update for 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

@gitlost gitlost added the command:language Related to 'language' command label Jan 25, 2018
@gitlost
Copy link
Copy Markdown
Contributor Author

gitlost commented Jan 25, 2018

See also #27

Edit: ah, made a bags of this.

@schlessera schlessera requested a review from a team April 3, 2018 20:00
@schlessera schlessera added this to the 1.0.8 milestone Aug 2, 2018
@schlessera schlessera merged commit e0e526d into master Aug 2, 2018
@schlessera schlessera deleted the wip-plugin-theme-command branch August 2, 2018 09:27
@schlessera schlessera changed the title Add plugin and theme command. Add language plugin and language theme command. Aug 2, 2018
@swissspidy
Copy link
Copy Markdown
Member

@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?

@swissspidy swissspidy mentioned this pull request Aug 2, 2018
@schlessera
Copy link
Copy Markdown
Member

Well, you made some changes, and it looked complete to me. Are there things you think are missing/incomplete/broken?

@swissspidy
Copy link
Copy Markdown
Member

No, not really. Besides these changes I made, I can't remember what else specifically was missing or incomplete back in January. #28 was a bit vague :-)

I'll work on #27 though, and maybe #22.

@schlessera
Copy link
Copy Markdown
Member

#27 seems important, as I just had that issue without knowing what was going on.

@schlessera
Copy link
Copy Markdown
Member

What does not work as we had initially discussed is that operations like update automatically work across all plugins/themes and language packs are always downloaded in their latest version, irregardless of what version of the plugin/theme is installed.

But I think of these are limitations of the infrastructure that we cannot easily get around, aren't they?

@swissspidy
Copy link
Copy Markdown
Member

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.

schlessera added a commit that referenced this pull request Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:language Related to 'language' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add plugin and theme command

3 participants