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

Fix script translations problem #998

Closed
wants to merge 1 commit into from
Closed

Fix script translations problem #998

wants to merge 1 commit into from

Conversation

antonlukin
Copy link
Contributor

@antonlukin antonlukin commented Sep 17, 2023

It seems that js script translations (for blocks) still not working.
I determined that the problem is the absence of a required wp_set_script_translations function call.

Checked this edition on the last plugin version and it works.

@GaryJones GaryJones added this to the 3.5.16 milestone Sep 17, 2023
@GaryJones
Copy link
Contributor

Thanks!

Since this 3.5.x branch still supports WP 4.1, then I think it will need the JS language files generating and adding to the /languages directory and the function call update to include the path argument. Could you add that in please?

I'm expecting this to be the last (or one of the last) 3.5.x releases and the 3.6.x branch will have a much higher version of minimum WordPress, so all of the local translation files and language path references can then be removed.

@antonlukin antonlukin closed this Sep 18, 2023
@antonlukin antonlukin reopened this Sep 18, 2023
@antonlukin
Copy link
Contributor Author

antonlukin commented Sep 18, 2023

@GaryJones I have no confidence that I did everything right.

Added the latest translations from existing language packs:
https://translate.wordpress.org/projects/wp-plugins/co-authors-plus/language-packs/

@GaryJones
Copy link
Contributor

Regenerate .pot file:

wp i18n make-pot . languages/co-authors-plus.pot

Update .po files from .pot:

wp i18n update-po languages/co-authors-plus.pot

Regenerate .mo files from .po files (ideally the .po files would have been translated first - I did en-GB).

wp i18n make-mo languages/

Regenerate JSON files:

wp i18n make-json languages/

@GaryJones
Copy link
Contributor

GaryJones commented Sep 27, 2023

@antonlukin I cherry-picked your work into a new branch and rejigged it into some new commits in #1007, which unfortunately didn't retain you as the original committer. I'd love it if you could test the current develop branch and double-check that the JS translations are working for you now.

Thank you!

@antonlukin
Copy link
Contributor Author

I checked, everything works correctly. Thanks a lot!

@alecgeatches alecgeatches mentioned this pull request Apr 12, 2024
@alecgeatches alecgeatches modified the milestones: 3.5.16, 3.6 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants