wp-cli / language-command

Installs, activates, and manages language packs.
MIT License
13 stars 22 forks source link

`wp language plugin install <plugin> <language>`: `Language '<language>' not available.` #119

Closed strarsis closed 1 year ago

strarsis commented 1 year ago

Bug Report

Describe the current, buggy behavior When trying to install a specific language for a specific plugin, where the language exist, the wp language plugin install command prints Language '<language>' not available..

Describe how other contributors can replicate this bug

Describe what you would expect as the correct outcome The specific language that is available should be successfully installed and become available.

Let us know what environment you are running this on

OS:     Linux 5.4.0-117-generic #132-Ubuntu SMP Thu Jun 2 00:39:06 UTC 2022 x86_64
Shell:  /bin/bash
PHP binary:     /usr/bin/php7.4
PHP version:    7.4.30
php.ini used:   /etc/php/7.4/cli/php.ini
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.5.16-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /home/web
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.6.0

Provide a possible solution (Not sure what is responsible: The language API; the request to the language API?).

Provide additional context/Screenshots Translations are available for language de_DE for that specific plugin: https://translate.wordpress.org/locale/de/default/wp-plugins/woo-order-export-lite/

There is a notice though on the German (de_DE) version of the plugin page that indicates that the plugin hadn't been translated in German yet - but the translate list contradicts this, as a quite high percentage is already translated.

strarsis commented 1 year ago

So the amount of translations for that plugin and locale wasn't above the 90% threshold, hence no language packs are generated for it yet.

It would be still nice to have a feature in WP CLI language that allows to download the translations when there is no language pack yet.