|
5 | 5 | * |
6 | 6 | * ## EXAMPLES |
7 | 7 | * |
8 | | - * # Install the Dutch plugin language pack. |
| 8 | + * # Install the Dutch plugin language pack for Hello Dolly. |
9 | 9 | * $ wp language plugin install hello-dolly nl_NL |
10 | | - * Success: Language installed. |
| 10 | + * Downloading translation from https://downloads.wordpress.org/translation/plugin/hello-dolly/1.7.2/nl_NL.zip... |
| 11 | + * Unpacking the update... |
| 12 | + * Installing the latest version... |
| 13 | + * Removing the old version of the translation... |
| 14 | + * Translation updated successfully. |
| 15 | + * Language 'nl_NL' installed. |
| 16 | + * Success: Installed 1 of 1 languages. |
11 | 17 | * |
12 | | - * # Uninstall the Dutch plugin language pack. |
| 18 | + * # Uninstall the Dutch plugin language pack for Hello Dolly. |
13 | 19 | * $ wp language plugin uninstall hello-dolly nl_NL |
14 | | - * Success: Language uninstalled. |
| 20 | + * Language 'nl_NL' for 'hello-dolly' uninstalled. |
| 21 | + * +-------------+--------+-------------+ |
| 22 | + * | name | locale | status | |
| 23 | + * +-------------+--------+-------------+ |
| 24 | + * | hello-dolly | nl_NL | uninstalled | |
| 25 | + * +-------------+--------+-------------+ |
| 26 | + * Success: Uninstalled 1 of 1 languages. |
15 | 27 | * |
16 | | - * # List installed plugin language packages. |
17 | | - * $ wp language plugin list --status=installed |
18 | | - * +----------+--------------+-------------+-----------+-----------+---------------------+ |
19 | | - * | language | english_name | native_name | status | update | updated | |
20 | | - * +----------+--------------+-------------+-----------+-----------+---------------------+ |
21 | | - * | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 | |
22 | | - * +----------+--------------+-------------+-----------+-----------+---------------------+ |
| 28 | + * # List installed plugin language packs for Hello Dolly. |
| 29 | + * $ wp language plugin list hello-dolly --status=installed |
| 30 | + * +-------------+----------+--------------+-------------+-----------+--------+---------------------+ |
| 31 | + * | plugin | language | english_name | native_name | status | update | updated | |
| 32 | + * +-------------+----------+--------------+-------------+-----------+--------+---------------------+ |
| 33 | + * | hello-dolly | nl_NL | Dutch | Nederlands | installed | none | 2023-11-13 12:34:15 | |
| 34 | + * +-------------+----------+--------------+-------------+-----------+--------+---------------------+ |
| 35 | + * |
| 36 | + * @package wp-cli |
23 | 37 | */ |
24 | 38 | class Plugin_Language_Command extends WP_CLI\CommandWithTranslation { |
25 | 39 | protected $obj_type = 'plugins'; |
@@ -78,8 +92,8 @@ class Plugin_Language_Command extends WP_CLI\CommandWithTranslation { |
78 | 92 | * |
79 | 93 | * ## EXAMPLES |
80 | 94 | * |
81 | | - * # List language,english_name,status fields of available languages. |
82 | | - * $ wp language plugin list --fields=language,english_name,status |
| 95 | + * # List available language packs for the plugin. |
| 96 | + * $ wp language plugin list hello-dolly --fields=language,english_name,status |
83 | 97 | * +----------------+-------------------------+-------------+ |
84 | 98 | * | language | english_name | status | |
85 | 99 | * +----------------+-------------------------+-------------+ |
@@ -223,6 +237,7 @@ public function is_installed( $args, $assoc_args = array() ) { |
223 | 237 | * Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/4.0.3/ja.zip... |
224 | 238 | * Unpacking the update... |
225 | 239 | * Installing the latest version... |
| 240 | + * Removing the old version of the translation... |
226 | 241 | * Translation updated successfully. |
227 | 242 | * Language 'ja' installed. |
228 | 243 | * Success: Installed 1 of 1 languages. |
@@ -392,8 +407,15 @@ private function install_many( $args, $assoc_args ) { |
392 | 407 | * |
393 | 408 | * ## EXAMPLES |
394 | 409 | * |
| 410 | + * # Uninstall the Japanese plugin language pack for Hello Dolly. |
395 | 411 | * $ wp language plugin uninstall hello-dolly ja |
396 | | - * Success: Language uninstalled. |
| 412 | + * Language 'ja' for 'hello-dolly' uninstalled. |
| 413 | + * +-------------+--------+-------------+ |
| 414 | + * | name | locale | status | |
| 415 | + * +-------------+--------+-------------+ |
| 416 | + * | hello-dolly | ja | uninstalled | |
| 417 | + * +-------------+--------+-------------+ |
| 418 | + * Success: Uninstalled 1 of 1 languages. |
397 | 419 | * |
398 | 420 | * @subcommand uninstall |
399 | 421 | */ |
@@ -553,6 +575,7 @@ public function uninstall( $args, $assoc_args ) { |
553 | 575 | * |
554 | 576 | * ## EXAMPLES |
555 | 577 | * |
| 578 | + * # Update all installed language packs for all plugins. |
556 | 579 | * $ wp language plugin update --all |
557 | 580 | * Updating 'Japanese' translation for Akismet 3.1.11... |
558 | 581 | * Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/ja.zip... |
|
0 commit comments