wp-cli / language-command

Installs, activates, and manages language packs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp language plugin update doesn't catch new updates

nickw108 opened this issue · comments

I'm using wp-cli v2.1.0 with PHP 5.6 directly on the web server and noticed that wp language plugin update --all did not find the latest updates for woo-gutenberg-products-block plugin. When I update translations via backend it works though.

image

Any ideas what I might be missing here? Not sure if this is a bug, but I thought I should probably let you know.

I just set the PHP version for the console to PHP 7.2, so that it's the same version that WordPress itself uses and tried again, but only the WooCommerce plugin translation gets updated, not the WooCommerce Blocks plugin 😢

-bash-4.2$ wp language plugin update --all
Updating 'German (Switzerland, Informal)' translation for WooCommerce 3.5.4...
Using cached file '/.wp-cli/cache/translation/plugin-woocommerce-3.5.4-de_CH_informal-1548425616.zip'...
Unpacking the update...
Installing the latest version...
Translation updated successfully.
Success: Updated 1/1 translation.

WP-CLI can't update anything if you've already updated translations via the admin.

What does wp language plugin list print?

What happens when trying to update after running wp cli cache clear?

Thanks for your feedback, Pascal 😄 I first tried to update via WP-CLI before updating via the admin.

I just reset my WordPress install to before the plugin language updates and cleared the cache, but it still doesn't work, i.e. only the WooCommerce plugin language is updated:

-bash-4.2$ wp language plugin update --all
Updating 'German (Switzerland, Informal)' translation for WooCommerce 3.5.4...
Downloading translation from https://downloads.wordpress.org/translation/plugin/woocommerce/3.5.4/de_CH_informal.zip...
Unpacking the update...
Installing the latest version...
Translation updated successfully.
Success: Updated 1/1 translation.

Didn't know wp language plugin list list, very nice! Here's the output

-bash-4.2$ wp language plugin list --all
+----------------------------------------------+----------------+--------------------------------+-------------------------+-------------+--------+---------------------+
| plugin                                       | language       | english_name                   | native_name             | status      | update | updated             |
+----------------------------------------------+----------------+--------------------------------+-------------------------+-------------+--------+---------------------+
| multilingual-press                           | ca             | Catalan                        | Català                  | uninstalled | none   | 2017-12-07 11:00:10 |
| multilingual-press                           | de_DE          | German                         | Deutsch                 | uninstalled | none   | 2018-10-30 20:59:24 |
| multilingual-press                           | de_DE_formal   | German (Formal)                | Deutsch (Sie)           | uninstalled | none   | 2017-05-23 11:23:12 |
| multilingual-press                           | en_GB          | English (UK)                   | English (UK)            | uninstalled | none   | 2018-12-13 09:15:38 |
| multilingual-press                           | en_US          | English (United States)        | English (United States) | installed   | none   |                     |
| multilingual-press                           | es_ES          | Spanish (Spain)                | Español                 | uninstalled | none   | 2018-10-02 21:24:26 |
| multilingual-press                           | fr_FR          | French (France)                | Français                | uninstalled | none   | 2017-01-29 07:28:34 |
| multilingual-press                           | nl_NL          | Dutch                          | Nederlands              | uninstalled | none   | 2018-04-23 09:39:36 |
| multilingual-press                           | nl_NL_formal   | Dutch (Formal)                 | Nederlands (Formeel)    | uninstalled | none   | 2018-04-23 09:36:01 |
| multilingual-press                           | ru_RU          | Russian                        | Русский                 | uninstalled | none   | 2016-12-12 11:07:21 |
| woocommerce                                  | ar             | Arabic                         | العربية                 | uninstalled | none   | 2019-01-23 22:23:57 |
| woocommerce                                  | ary            | Moroccan Arabic                | العربية المغربية        | uninstalled | none   | 2017-01-11 10:56:59 |
| woocommerce                                  | bg_BG          | Bulgarian                      | Български               | uninstalled | none   | 2018-12-10 17:26:20 |
| woocommerce                                  | ca             | Catalan                        | Català                  | uninstalled | none   | 2018-12-01 09:08:58 |
| woocommerce                                  | cs_CZ          | Czech                          | Čeština                 | uninstalled | none   | 2019-02-05 07:53:33 |
| woocommerce                                  | da_DK          | Danish                         | Dansk                   | uninstalled | none   | 2019-02-02 22:32:49 |
| woocommerce                                  | de_CH          | German (Switzerland)           | Deutsch (Schweiz)       | uninstalled | none   | 2019-01-25 14:11:54 |
| woocommerce                                  | de_CH_informal | German (Switzerland, Informal) | Deutsch (Schweiz, Du)   | active      | none   | 2019-01-25 14:13:36 |
| woocommerce                                  | de_DE          | German                         | Deutsch                 | uninstalled | none   | 2019-02-05 12:34:43 |
| woocommerce                                  | de_DE_formal   | German (Formal)                | Deutsch (Sie)           | uninstalled | none   | 2019-02-05 12:34:06 |
| woocommerce                                  | el             | Greek                          | Ελληνικά                | uninstalled | none   | 2019-01-24 11:04:40 |
| woocommerce                                  | en_AU          | English (Australia)            | English (Australia)     | uninstalled | none   | 2019-01-21 21:41:41 |
| woocommerce                                  | en_CA          | English (Canada)               | English (Canada)        | uninstalled | none   | 2019-01-21 19:45:19 |
| woocommerce                                  | en_GB          | English (UK)                   | English (UK)            | uninstalled | none   | 2019-01-21 19:44:34 |
| woocommerce                                  | en_NZ          | English (New Zealand)          | English (New Zealand)   | uninstalled | none   | 2019-01-21 21:41:13 |
| woocommerce                                  | en_US          | English (United States)        | English (United States) | installed   | none   |                     |
| woocommerce                                  | en_ZA          | English (South Africa)         | English (South Africa)  | uninstalled | none   | 2018-08-30 12:11:59 |
| woocommerce                                  | eo             | Esperanto                      | Esperanto               | uninstalled | none   | 2018-06-28 16:02:38 |
| woocommerce                                  | es_CL          | Spanish (Chile)                | Español de Chile        | uninstalled | none   | 2018-12-20 16:13:04 |
| woocommerce                                  | es_CR          | Spanish (Costa Rica)           | Español de Costa Rica   | uninstalled | none   | 2017-10-13 21:30:59 |
| woocommerce                                  | es_ES          | Spanish (Spain)                | Español                 | uninstalled | none   | 2019-01-28 17:24:19 |
| woocommerce                                  | es_MX          | Spanish (Mexico)               | Español de México       | uninstalled | none   | 2019-01-21 23:21:33 |
| woocommerce                                  | es_VE          | Spanish (Venezuela)            | Español de Venezuela    | uninstalled | none   | 2018-02-20 07:32:28 |
| woocommerce                                  | et             | Estonian                       | Eesti                   | uninstalled | none   | 2019-01-22 08:08:40 |
| woocommerce                                  | eu             | Basque                         | Euskara                 | uninstalled | none   | 2016-04-25 21:11:39 |
| woocommerce                                  | fa_IR          | Persian                        | فارسی                   | uninstalled | none   | 2019-01-31 05:26:40 |
| woocommerce                                  | fi             | Finnish                        | Suomi                   | uninstalled | none   | 2019-02-03 22:26:36 |
| woocommerce                                  | fr_CA          | French (Canada)                | Français du Canada      | uninstalled | none   | 2017-06-08 13:23:21 |
| woocommerce                                  | fr_FR          | French (France)                | Français                | uninstalled | none   | 2019-01-28 16:21:16 |
| woocommerce                                  | he_IL          | Hebrew                         | עִבְרִית                   | uninstalled | none   | 2019-01-29 14:54:07 |
| woocommerce                                  | hr             | Croatian                       | Hrvatski                | uninstalled | none   | 2019-01-22 08:07:20 |
| woocommerce                                  | hu_HU          | Hungarian                      | Magyar                  | uninstalled | none   | 2019-02-05 09:51:10 |
| woocommerce                                  | it_IT          | Italian                        | Italiano                | uninstalled | none   | 2019-01-31 04:41:00 |
| woocommerce                                  | ja             | Japanese                       | 日本語                  | uninstalled | none   | 2019-02-04 03:36:09 |
| woocommerce                                  | ko_KR          | Korean                         | 한국어                  | uninstalled | none   | 2019-02-04 02:20:03 |
| woocommerce                                  | lt_LT          | Lithuanian                     | Lietuvių kalba          | uninstalled | none   | 2017-12-13 20:46:01 |
| woocommerce                                  | lv             | Latvian                        | Latviešu valoda         | uninstalled | none   | 2018-05-23 16:02:08 |
| woocommerce                                  | nb_NO          | Norwegian (Bokmål)             | Norsk bokmål            | uninstalled | none   | 2019-01-29 08:18:53 |
| woocommerce                                  | nl_BE          | Dutch (Belgium)                | Nederlands (België)     | uninstalled | none   | 2017-09-30 08:10:48 |
| woocommerce                                  | nl_NL          | Dutch                          | Nederlands              | uninstalled | none   | 2019-01-28 10:21:49 |
| woocommerce                                  | nl_NL_formal   | Dutch (Formal)                 | Nederlands (Formeel)    | uninstalled | none   | 2016-04-25 20:56:39 |
| woocommerce                                  | oci            | Occitan                        | Occitan                 | uninstalled | none   | 2016-05-11 06:04:09 |
| woocommerce                                  | pl_PL          | Polish                         | Polski                  | uninstalled | none   | 2019-01-03 21:22:35 |
| woocommerce                                  | pt_BR          | Portuguese (Brazil)            | Português do Brasil     | uninstalled | none   | 2019-01-22 13:54:27 |
| woocommerce                                  | pt_PT          | Portuguese (Portugal)          | Português               | uninstalled | none   | 2019-01-15 12:29:10 |
| woocommerce                                  | pt_PT_ao90     | Portuguese (Portugal, AO90)    | Português (AO90)        | uninstalled | none   | 2018-01-25 16:02:01 |
| woocommerce                                  | ro_RO          | Romanian                       | Română                  | uninstalled | none   | 2019-01-29 14:51:51 |
| woocommerce                                  | ru_RU          | Russian                        | Русский                 | uninstalled | none   | 2019-01-24 09:41:00 |
| woocommerce                                  | sk_SK          | Slovak                         | Slovenčina              | uninstalled | none   | 2019-01-29 19:29:49 |
| woocommerce                                  | sl_SI          | Slovenian                      | Slovenščina             | uninstalled | none   | 2018-10-31 18:22:29 |
| woocommerce                                  | sr_RS          | Serbian                        | Српски језик            | uninstalled | none   | 2018-12-20 17:40:51 |
| woocommerce                                  | sv_SE          | Swedish                        | Svenska                 | uninstalled | none   | 2019-01-22 14:24:17 |
| woocommerce                                  | th             | Thai                           | ไทย                     | uninstalled | none   | 2017-01-16 14:49:50 |
| woocommerce                                  | tr_TR          | Turkish                        | Türkçe                  | uninstalled | none   | 2019-01-24 11:47:11 |
| woocommerce                                  | uk             | Ukrainian                      | Українська              | uninstalled | none   | 2019-01-26 19:37:01 |
| woocommerce                                  | vi             | Vietnamese                     | Tiếng Việt              | uninstalled | none   | 2018-07-30 15:27:20 |
| woocommerce                                  | zh_CN          | Chinese (China)                | 简体中文                | uninstalled | none   | 2019-01-29 10:54:07 |
| woocommerce                                  | zh_HK          | Chinese (Hong Kong)            | 香港中文版	             | uninstalled | none   | 2018-08-17 17:19:37 |
| woocommerce                                  | zh_TW          | Chinese (Taiwan)               | 繁體中文                | uninstalled | none   | 2019-01-29 08:54:09 |
| woo-gutenberg-products-block                 | da_DK          | Danish                         | Dansk                   | uninstalled | none   | 2019-01-18 08:41:06 |
| woo-gutenberg-products-block                 | de_CH          | German (Switzerland)           | Deutsch (Schweiz)       | uninstalled | none   | 2019-01-28 10:54:43 |
| woo-gutenberg-products-block                 | de_CH_informal | German (Switzerland, Informal) | Deutsch (Schweiz, Du)   | active      | none   | 2019-01-28 10:52:03 |
| woo-gutenberg-products-block                 | de_DE          | German                         | Deutsch                 | uninstalled | none   | 2019-01-28 10:46:51 |
| woo-gutenberg-products-block                 | de_DE_formal   | German (Formal)                | Deutsch (Sie)           | uninstalled | none   | 2019-01-28 10:38:28 |
| woo-gutenberg-products-block                 | en_US          | English (United States)        | English (United States) | installed   | none   |                     |
| woo-gutenberg-products-block                 | es_ES          | Spanish (Spain)                | Español                 | uninstalled | none   | 2019-01-19 20:01:04 |
| woo-gutenberg-products-block                 | fr_FR          | French (France)                | Français                | uninstalled | none   | 2019-01-19 07:27:52 |
| woo-gutenberg-products-block                 | ja             | Japanese                       | 日本語                  | uninstalled | none   | 2019-01-25 07:24:26 |
| woo-gutenberg-products-block                 | lt_LT          | Lithuanian                     | Lietuvių kalba          | uninstalled | none   | 2018-12-12 00:23:24 |
| woo-gutenberg-products-block                 | ru_RU          | Russian                        | Русский                 | uninstalled | none   | 2019-01-29 00:42:38 |
| woo-gutenberg-products-block                 | uk             | Ukrainian                      | Українська              | uninstalled | none   | 2019-01-08 10:13:28 |
| wp-woocommerce-stock-synchronization-develop | en_US          | English (United States)        | English (United States) | installed   | none   |                     |
+----------------------------------------------+----------------+--------------------------------+-------------------------+-------------+--------+---------------------+

which suggests that wp language seems to assume that there's no update for woo-gutenberg-products-block de_CH_informal, although there is.

I have the same issue, tablepress broken-link-checker do not update via wp-cli, but directly via the www interface

I solved it, at least for me. It seems that if an existing plugin language is not yet installed the GUI notices that and provides an "update" (ie installs it) and wp language does not bother to look. This command solved my issue wp language plugin install --all

I resolved this issue with wp language plugin install --all <language> such as wp language plugin install --all ko_KR

I have the same issue as the original poster. Updating translations from the cli always gives "Translations are up to date." when they clearly aren't. However, using the Wordpress interface to update the languages works (for the default language, only, though. For me, the last two posted commands didn't work.

I'm using WPML - maybe it interferes with the process? Also, the installation is based on rrots/bedrock.

Were some translations already installed? If not, you'd need to run wp language plugin install ... first as per the above comments.

And yes, it's possible that WPML interferes with the whole language pack process, so also test without it.

Ouch... I missed the install part of that command, didn't know that existed, actually. Thanks for the hint! All works as expected now with WPML activated.

Closing as wp language plugin install solves this as expected