Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples for language core command #142

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions src/Core_Language_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,31 @@
*
* # Install the Dutch core language pack.
* $ wp language core install nl_NL
* Success: Language installed.
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip...
* Unpacking the update...
* Installing the latest version...
* Removing the old version of the translation...
* Translation updated successfully.
* Language 'nl_NL' installed.
* Success: Installed 1 of 1 languages.
*
* # Activate the Dutch core language pack.
* $ wp language core activate nl_NL
* $ wp site switch-language nl_NL
* Success: Language activated.
*
* # Uninstall the Dutch core language pack.
* $ wp language core uninstall nl_NL
* Success: Language uninstalled.
*
* # List installed core language packages.
* # List installed core language packs.
* $ wp language core list --status=installed
* +----------+--------------+-------------+-----------+-----------+---------------------+
* | language | english_name | native_name | status | update | updated |
* +----------+--------------+-------------+-----------+-----------+---------------------+
* | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 |
* | nl_NL | Dutch | Nederlands | installed | available | 2024-01-31 10:24:06 |
* +----------+--------------+-------------+-----------+-----------+---------------------+
*
* @package wp-cli
*/
class Core_Language_Command extends WP_CLI\CommandWithTranslation {
protected $obj_type = 'core';
Expand Down Expand Up @@ -173,9 +181,10 @@ public function is_installed( $args, $assoc_args = array() ) {
*
* # Install the Japanese language.
* $ wp language core install ja
* Downloading translation from https://downloads.wordpress.org/translation/core/4.9.8/ja.zip...
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip...
* Unpacking the update...
* Installing the latest version...
* Removing the old version of the translation...
* Translation updated successfully.
* Language 'ja' installed.
* Success: Installed 1 of 1 languages.
Expand Down Expand Up @@ -237,6 +246,7 @@ public function install( $args, $assoc_args ) {
*
* ## EXAMPLES
*
* # Uninstall the Japanese core language pack.
* $ wp language core uninstall ja
* Success: Language uninstalled.
*
Expand Down Expand Up @@ -320,9 +330,10 @@ public function uninstall( $args, $assoc_args ) {
*
* ## EXAMPLES
*
* # Update installed core languages packs.
* $ wp language core update
* Updating 'Japanese' translation for WordPress 4.9.2...
* Downloading translation from https://downloads.wordpress.org/translation/core/4.9.2/ja.zip...
* Updating 'Japanese' translation for WordPress 6.4.3...
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip...
* Translation updated successfully.
* Success: Updated 1/1 translation.
*
Expand All @@ -344,6 +355,7 @@ public function update( $args, $assoc_args ) { // phpcs:ignore Generic.CodeAnaly
*
* ## EXAMPLES
*
* # Activate the given language.
* $ wp language core activate ja
* Success: Language activated.
*
Expand Down
Loading