From 838c4bd4839a7a9e832edd403e806a8c15ddcd13 Mon Sep 17 00:00:00 2001 From: Umesh Kumar Date: Thu, 13 Jun 2024 10:37:56 +0200 Subject: [PATCH 1/4] Update doc for wp language core install command. Related https://github.com/wp-cli/wp-cli/issues/5955 --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2895a690..8ec6b8c5 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Installs a given language. wp language core install ... [--activate] ~~~ -Downloads the language pack from WordPress.org. +Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/ **OPTIONS** @@ -172,6 +172,16 @@ Downloads the language pack from WordPress.org. Language 'ja' installed. Success: Installed 1 of 1 languages. + # Install the Portuguese (Portugal) language. + $ wp language core install pt_PT + Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_PT.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'pt_PT' installed. + Success: Installed 1 of 1 languages. + ### wp language core list From 85dc78d1677e884113affd0b7aee6afe46edb137 Mon Sep 17 00:00:00 2001 From: Umesh Kumar Date: Thu, 13 Jun 2024 10:48:35 +0200 Subject: [PATCH 2/4] update spacing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ec6b8c5..7e7cac74 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Downloads the language pack from WordPress.org. Find your language code at: http Language 'ja' installed. Success: Installed 1 of 1 languages. - # Install the Portuguese (Portugal) language. + # Install the Portuguese (Portugal) language. $ wp language core install pt_PT Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_PT.zip... Unpacking the update... From f6bc915a854a880ab4939a9b14b1929c4c337681 Mon Sep 17 00:00:00 2001 From: Umesh Kumar Date: Thu, 13 Jun 2024 12:28:26 +0200 Subject: [PATCH 3/4] Updated doc --- README.md | 12 +----------- src/Core_Language_Command.php | 12 ++++++------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7e7cac74..2895a690 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Installs a given language. wp language core install ... [--activate] ~~~ -Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/ +Downloads the language pack from WordPress.org. **OPTIONS** @@ -172,16 +172,6 @@ Downloads the language pack from WordPress.org. Find your language code at: http Language 'ja' installed. Success: Installed 1 of 1 languages. - # Install the Portuguese (Portugal) language. - $ wp language core install pt_PT - Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_PT.zip... - Unpacking the update... - Installing the latest version... - Removing the old version of the translation... - Translation updated successfully. - Language 'pt_PT' installed. - Success: Installed 1 of 1 languages. - ### wp language core list diff --git a/src/Core_Language_Command.php b/src/Core_Language_Command.php index 21c82439..a7c45060 100644 --- a/src/Core_Language_Command.php +++ b/src/Core_Language_Command.php @@ -168,26 +168,26 @@ public function is_installed( $args, $assoc_args = array() ) { /** * Installs a given language. * - * Downloads the language pack from WordPress.org. + * Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/ * * ## OPTIONS * * ... - * : Language code to install. + * : Language code to install, it is based on the ISO-639 language code (e.g. pt for Portuguese) followed by the ISO-3166 country code (e.g. PT for Portugal or BR for Brazil). So, the Brazilian Portuguese file would be called pt_BR * * [--activate] * : If set, the language will be activated immediately after install. * * ## EXAMPLES * - * # Install the Japanese language. - * $ wp language core install ja - * Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip... + * # Install the Brazilian Portuguese language. + * $ wp language core install pt_BR + * Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_BR.zip... * Unpacking the update... * Installing the latest version... * Removing the old version of the translation... * Translation updated successfully. - * Language 'ja' installed. + * Language 'pt_BR' installed. * Success: Installed 1 of 1 languages. * * @subcommand install From 57f6dfde5d673f61fddaec93ef21c305e044e593 Mon Sep 17 00:00:00 2001 From: Umesh Kumar Date: Wed, 19 Jun 2024 15:10:14 +0530 Subject: [PATCH 4/4] Updated doc --- src/Core_Language_Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core_Language_Command.php b/src/Core_Language_Command.php index a7c45060..81ac2a98 100644 --- a/src/Core_Language_Command.php +++ b/src/Core_Language_Command.php @@ -173,7 +173,7 @@ public function is_installed( $args, $assoc_args = array() ) { * ## OPTIONS * * ... - * : Language code to install, it is based on the ISO-639 language code (e.g. pt for Portuguese) followed by the ISO-3166 country code (e.g. PT for Portugal or BR for Brazil). So, the Brazilian Portuguese file would be called pt_BR + * : Language code to install. * * [--activate] * : If set, the language will be activated immediately after install.