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

Properly internationalize strings in JS #3079

Merged
merged 6 commits into from
Oct 26, 2022
Merged

Properly internationalize strings in JS #3079

merged 6 commits into from
Oct 26, 2022

Conversation

felipeelia
Copy link
Member

Description of the Change

This PR applies the changes outlined in #3059

Closes #3059

How to test the Change

Changelog Entry

Fixed - Internationalization of strings in JavaScript files

Credits

Props @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.4.0 milestone Oct 25, 2022
@felipeelia felipeelia self-assigned this Oct 25, 2022
@felipeelia
Copy link
Member Author

felipeelia commented Oct 25, 2022

Currently the wp i18n make-pot command is failing while parsing the following JS files:

  • dist/js/ordering-script.js
  • dist/js/related-posts-block-script.js
  • dist/js/stats-script.js
  • dist/js/synonyms-script.js

I am currently investigating why that is happening (the error message points to the mck89/peast library but doesn't help much)

ps.: This actually only happens when XDebug is turned on.

@felipeelia
Copy link
Member Author

It seems the block translation is not working (WP should call wp_set_script_translations() automatically but IDK that is not working). That is the last part needed for this PR.

@felipeelia
Copy link
Member Author

This issue is somewhat related but not entirely: https://core.trac.wordpress.org/ticket/54797

@felipeelia felipeelia changed the title [WIP] Properly internationalize strings in JS Properly internationalize strings in JS Oct 26, 2022
@felipeelia felipeelia merged commit 84a77d3 into develop Oct 26, 2022
@felipeelia felipeelia deleted the fix/issue-3059 branch October 26, 2022 13:51
This was referenced Feb 28, 2023
@felipeelia felipeelia mentioned this pull request Apr 3, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Apr 14, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Jun 6, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Jul 4, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Aug 7, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Aug 30, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Sep 27, 2023
19 tasks
@felipeelia felipeelia mentioned this pull request Dec 6, 2023
18 tasks
@felipeelia felipeelia mentioned this pull request Jan 11, 2024
19 tasks
@felipeelia felipeelia mentioned this pull request Mar 21, 2024
18 tasks
@felipeelia felipeelia mentioned this pull request May 24, 2024
18 tasks
This was referenced Jun 11, 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.

BUG: Translation of JavaScript files
1 participant