wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 15 forks source link

Export translation entries without references to files #265

Closed krokodok closed 5 months ago

krokodok commented 5 months ago

Description I discovered that Traduttore was not working properly any more since updating WP-CLI to 2.10.0 from 2.9.0. For some projects, all translations would end up in the JSON file and leaving the PO file empty.

I originally just wanted to get the strings for "Template name of the Theme" into the PO file. After the Update to WP-CLI 2.10.0 and with this commit, this also works now.

How has this been tested?

Screenshots

WP-CLI 2.9.0 (without this commit)

grafik

WP-CLI 2.10.0 (without this commit)

grafik The PO file is now empty.

WP-CLI 2.10.0 (with this commit)

grafik grafik

Types of changes

Checklist:

krokodok commented 5 months ago

The breaking change from WP-CLI 2.9.0 to 2.10.0 must be somewhere in here, but I was not able to locate it yet: https://github.com/wp-cli/i18n-command/compare/v2.4.4...v2.6.0

ocean90 commented 5 months ago

The export has actually nothing to do with WP-CLI. This was a bug in Traduttore since the beginning. On w.org, this was already fixed 3 years ago but never copied to Traduttore.

krokodok commented 5 months ago

@ocean90 So would you say this simple if clause fix from WordPress.org is ready to be merged and deployed?