Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export translation entries without references to files #265

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

krokodok
Copy link
Contributor

@krokodok krokodok commented Feb 16, 2024

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@krokodok krokodok changed the title Make Traduttore work again with php-cli 2.10.0 Make Traduttore work again with wp-cli 2.10.0 Feb 16, 2024
@krokodok
Copy link
Contributor Author

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: wp-cli/i18n-command@v2.4.4...v2.6.0

@ocean90
Copy link
Member

ocean90 commented Feb 16, 2024

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
Copy link
Contributor Author

krokodok commented Feb 16, 2024

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

@krokodok krokodok marked this pull request as ready for review February 16, 2024 14:23
Copy link
Member

@ocean90 ocean90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the change without the whitespace looks good!

https://github.com/wearerequired/traduttore/pull/265/files?diff=unified&w=1

@krokodok krokodok enabled auto-merge (squash) February 16, 2024 14:32
@krokodok krokodok merged commit 08c810e into master Feb 16, 2024
0 of 9 checks passed
@krokodok krokodok deleted the feature/php-cli-2.10.0 branch February 16, 2024 14:33
@ocean90 ocean90 changed the title Make Traduttore work again with wp-cli 2.10.0 Export translation entries without references to files Feb 16, 2024
@ocean90 ocean90 added this to the 4.0.0 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants