How do you update all translations using wp-cli? #5919
-
I tried: $ wp language core update; wp language theme update --all; wp language plugin update --all
Success: Translations are up to date.
Success: Translations are up to date.
Using cached file '/home/jesse/.wp-cli/cache/translation/plugin-query-monitor-3.15.0-en_GB-1700831851.zip'...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Using cached file '/home/jesse/.wp-cli/cache/translation/plugin-wp-mail-smtp-4.0.1-en_GB-1685901490.zip'...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Using cached file '/home/jesse/.wp-cli/cache/translation/plugin-wordpress-seo-22.2-en_GB-1709630337.zip'...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Success: Updated 3/3 translations.
Updating 'English (UK)' translation for Query Monitor 3.15.0...
Updating 'English (UK)' translation for WP Mail SMTP 4.0.1...
Updating 'English (UK)' translation for Yoast SEO 22.2... But when I go to the wp-admin/update-core.php page, it states that "New translations are available": Pressing the "Update Translations" button results in: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I solved it by looking at how wp-admin/upgrade-core.php updates translations, then coming up with my own command to run based on it: |
Beta Was this translation helpful? Give feedback.
I solved it by looking at how wp-admin/upgrade-core.php updates translations, then coming up with my own command to run based on it:
wp eval "require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; (new Language_Pack_Upgrader(new Language_Pack_Upgrader_Skin(['url' => 'update-core.php?action=do-translation-upgrade', 'nonce' => 'upgrade-translations', 'title' => __('Update Translations'), 'context' => WP_LANG_DIR])))->bulk_upgrade();"
;