diff --git a/features/language-plugin.feature b/features/language-plugin.feature index c55a6647..2d4cb6ea 100644 --- a/features/language-plugin.feature +++ b/features/language-plugin.feature @@ -17,7 +17,6 @@ Feature: Manage translation files for a WordPress install | language | english_name | status | | cs_CZ | Czech | uninstalled | | de_DE | German | uninstalled | - | en_US | English (United States) | active | | en_GB | English (UK) | uninstalled | When I try `wp language plugin list not-a-plugin --format=json` @@ -85,7 +84,6 @@ Feature: Manage translation files for a WordPress install | language | english_name | status | | cs_CZ | Czech | installed | | de_DE | German | installed | - | en_US | English (United States) | active | | en_GB | English (UK) | installed | When I run `wp language plugin list hello-dolly --fields=language,english_name,update` @@ -93,7 +91,6 @@ Feature: Manage translation files for a WordPress install | language | english_name | update | | cs_CZ | Czech | none | | de_DE | German | none | - | en_US | English (United States) | none | | en_GB | English (UK) | none | When I run `wp language plugin list hello-dolly --status=installed --format=count` diff --git a/features/language-theme.feature b/features/language-theme.feature index b210ae8e..ef9cb7de 100644 --- a/features/language-theme.feature +++ b/features/language-theme.feature @@ -16,7 +16,6 @@ Feature: Manage translation files for a WordPress install | language | english_name | status | | cs_CZ | Czech | uninstalled | | de_DE | German | uninstalled | - | en_US | English (United States) | active | | en_GB | English (UK) | uninstalled | When I try `wp language theme list not-a-theme --format=json` @@ -85,7 +84,6 @@ Feature: Manage translation files for a WordPress install | cs_CZ | Czech | installed | | de_DE | German | installed | | en_GB | English (UK) | installed | - | en_US | English (United States) | active | When I run `wp language theme list twentyten --fields=language,english_name,update` Then STDOUT should be a table containing rows: @@ -119,7 +117,6 @@ Feature: Manage translation files for a WordPress install | language | english_name | status | | cs_CZ | Czech | installed | | de_DE | German | installed | - | en_US | English (United States) | installed | | en_GB | English (UK) | active | When I run `wp language theme uninstall twentyten cs_CZ de_DE` diff --git a/src/WP_CLI/CommandWithTranslation.php b/src/WP_CLI/CommandWithTranslation.php index ca4b2b9e..96ab675e 100644 --- a/src/WP_CLI/CommandWithTranslation.php +++ b/src/WP_CLI/CommandWithTranslation.php @@ -249,9 +249,11 @@ protected function download_language_pack( $download, $slug = null ) { * @return array */ protected function get_installed_languages( $slug = 'default' ) { - $available = wp_get_installed_translations( $this->obj_type ); - $available = ! empty( $available[ $slug ] ) ? array_keys( $available[ $slug ] ) : array(); - $available[] = 'en_US'; + $available = wp_get_installed_translations( $this->obj_type ); + $available = ! empty( $available[ $slug ] ) ? array_keys( $available[ $slug ] ) : array(); + if ( 'core' === $this->obj_type ) { + $available[] = 'en_US'; + } return $available; }