Skip to content

Commit 4dd5437

Browse files
committed
Update examples for language theme command
1 parent 5bd3067 commit 4dd5437

File tree

1 file changed

+36
-14
lines changed

1 file changed

+36
-14
lines changed

src/Theme_Language_Command.php

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,35 @@
55
*
66
* ## EXAMPLES
77
*
8-
* # Install the Dutch theme language pack.
8+
* # Install the Dutch theme language pack for Twenty Ten.
99
* $ wp language theme install twentyten nl_NL
10-
* Success: Language installed.
10+
* Downloading translation from https://downloads.wordpress.org/translation/theme/twentyten/4.0/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.
1117
*
12-
* # Uninstall the Dutch theme language pack.
18+
* # Uninstall the Dutch theme language pack for Twenty Ten.
1319
* $ wp language theme uninstall twentyten nl_NL
14-
* Success: Language uninstalled.
20+
* Language 'nl_NL' for 'twentyten' uninstalled.
21+
* +-----------+--------+-------------+
22+
* | name | locale | status |
23+
* +-----------+--------+-------------+
24+
* | twentyten | nl_NL | uninstalled |
25+
* +-----------+--------+-------------+
26+
* Success: Uninstalled 1 of 1 languages.
1527
*
16-
* # List installed theme language packages.
17-
* $ wp language theme 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 theme language packs for Twenty Ten.
29+
* $ wp language theme list twentyten --status=installed
30+
* +-----------+----------+--------------+-------------+-----------+--------+---------------------+
31+
* | theme | language | english_name | native_name | status | update | updated |
32+
* +-----------+----------+--------------+-------------+-----------+--------+---------------------+
33+
* | twentyten | nl_NL | Dutch | Nederlands | installed | none | 2023-12-29 21:21:39 |
34+
* +-----------+----------+--------------+-------------+-----------+--------+---------------------+
35+
*
36+
* @package wp-cli
2337
*/
2438
class Theme_Language_Command extends WP_CLI\CommandWithTranslation {
2539
protected $obj_type = 'themes';
@@ -78,8 +92,8 @@ class Theme_Language_Command extends WP_CLI\CommandWithTranslation {
7892
*
7993
* ## EXAMPLES
8094
*
81-
* # List language,english_name,status fields of available languages.
82-
* $ wp language theme list --fields=language,english_name,status
95+
* # List available language packs for the theme.
96+
* $ wp language theme list twentyten --fields=language,english_name,status
8397
* +----------------+-------------------------+-------------+
8498
* | language | english_name | status |
8599
* +----------------+-------------------------+-------------+
@@ -397,8 +411,15 @@ private function install_many( $args, $assoc_args ) {
397411
*
398412
* ## EXAMPLES
399413
*
414+
* # Uninstall the Japanese theme language pack for Twenty Ten.
400415
* $ wp language theme uninstall twentyten ja
401-
* Success: Language uninstalled.
416+
* Language 'ja' for 'twentyten' uninstalled.
417+
* +-----------+--------+-------------+
418+
* | name | locale | status |
419+
* +-----------+--------+-------------+
420+
* | twentyten | ja | uninstalled |
421+
* +-----------+--------+-------------+
422+
* Success: Uninstalled 1 of 1 languages.
402423
*
403424
* @subcommand uninstall
404425
*/
@@ -564,6 +585,7 @@ public function uninstall( $args, $assoc_args ) {
564585
*
565586
* ## EXAMPLES
566587
*
588+
* # Update all installed language packs for all themes.
567589
* $ wp language theme update --all
568590
* Updating 'Japanese' translation for Twenty Fifteen 1.5...
569591
* Downloading translation from https://downloads.wordpress.org/translation/theme/twentyfifteen/1.5/ja.zip...

0 commit comments

Comments
 (0)