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

Generate translation files from bundles instead of native sources #2622

Closed
wants to merge 1 commit into from

Conversation

Tug
Copy link
Contributor

@Tug Tug commented Sep 16, 2020

Fixes #2615
This is an alternative to #2617

This PR contains a change in wp-cli.phar, that is being reviewed here wp-cli/i18n-command#228
It allows makepot to correctly parse our bundled JS and extract translation strings.

Using bundle as the source of truth for strings will make our i18n process less fragile, as any code that is included in it will be used to determine the strings to be translated. In return, we lose the position of those strings in our code as well as translators comments, something that has already been done on gutenberg to automate translations.

TODO:

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@Tug Tug added [Type] Enhancement Improves a current area of the editor i18n labels Sep 16, 2020
@Tug Tug self-assigned this Sep 16, 2020
@mchowning
Copy link
Contributor

I like this approach better than what I have suggested in #2617. Assuming we get the translations and encoding issues you mention resolved, this feels like a much more robust approach to take going forward. Nice work @Tug ! 👍

@mchowning
Copy link
Contributor

Our translations pipeline has undergone a lot of changes (some inspired by this PR), so I'm going to close this.

@mchowning mchowning closed this Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n [Type] Enhancement Improves a current area of the editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strings from Jetpack are not included in the bundle
2 participants