roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.76k stars 3.06k forks source link

🔧 Use `wp i18n update-po` for updating PO files #3081

Closed strarsis closed 1 year ago

strarsis commented 2 years ago

This PR replaces the existing shell script with a wp i18n invocation for the newly added update-po subcommand that updates the PO files with the POT file.

This eliminates the need for external tooling (except for the wp CLI of course) and shell scripts.

The latest wp i18n version (>=2.4.0) is needed for the newly added update-po subcommand. Until wp CLI is also newly released with the new wp i18n version bundled, the latest wp i18n version can be installed independently from the wp CLI version by using wp package install wp-cli/i18n-command:dev-main and then just using it as usual (wp i18n).

strarsis commented 1 year ago

@retlehs, @bonakor: Trying with the latest stable WP CLI, the command appears to work now without installing edge/dev versions of WP CLI or the i18n package, so this can be merged now!

retlehs commented 1 year ago

@strarsis Thank you!