wp-cli / language-command

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

Change activate command #23

Closed swissspidy closed 6 years ago

swissspidy commented 6 years ago

Currently, there's wp language core activate and --activate flags for the other commands.

Activating a language is nothing more than wp option update WPLANG <locale> and checking whether that language actually exists.

In #21, I started working on subcommands for plugins and themes. Activating a language is a global action per site. One cannot activate language X for plugin A and language Y for plugin B.

Should wp language core activate be renamed to wp language activate or wp language switch? See https://github.com/wp-cli/language-command/pull/21#issuecomment-354538850

swissspidy commented 6 years ago

@schlessera suggested wp site switch-language ... today to distinguish this from the wp language command which deals with language files, not database settings.

GaryJones commented 6 years ago

For those looking for it, the wp site command is here:

https://github.com/wp-cli/entity-command/blob/master/src/Site_Command.php

However, like https://github.com/wp-cli/checksum-command/blob/89a319440651f2867f282339c2223cfe5e9cc3fb/checksum-command.php shows, it's possible for one package to add a command that would typically be part of another package (i.e. this repo could add a wp site switch-language command)

swissspidy commented 6 years ago

Fixed in #29, where I introduced wp site switch-language and adding a deprecation warning to wp language core activate