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

BUG: Translation of JavaScript files #3059

Closed
4 tasks done
felipeelia opened this issue Oct 14, 2022 · 0 comments · Fixed by #3079
Closed
4 tasks done

BUG: Translation of JavaScript files #3059

felipeelia opened this issue Oct 14, 2022 · 0 comments · Fixed by #3079
Assignees
Labels
bug Something isn't working
Milestone

Comments

@felipeelia
Copy link
Member

felipeelia commented Oct 14, 2022

Describe the bug

Although we are using WordPress i18n functions in JS files, currently it is not possible to translate any of those strings.

Here is the list of things that needs to be changed:

  • 1. For each wp_enqueue_script() or wp_register_script() call we have, a call to wp_set_script_translations() needs to be added;
  • 2. We need to check if blocks' JS files also need that function call;
  • 2. The command responsible for parsing JS files and their i18n function calls ignores min files. To have them parsed, we will need to rename the min.js files to simply .js;
  • 3. To help people that are translating the plugin outside of the WP.org environment, we probably could add a make-pot call during the release process.

Some additional context:

@felipeelia felipeelia added the bug Something isn't working label Oct 14, 2022
@felipeelia felipeelia added this to the 4.4.0 milestone Oct 14, 2022
@felipeelia felipeelia self-assigned this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant