Automate updating gutenberg translations#10719
Automate updating gutenberg translations#10719Tug merged 25 commits intogutenberg/release-1.17.0from
Conversation
80560d2 to
7772480
Compare
|
You can test the changes on this Pull Request by downloading the APK here. |
9ff442e to
cfeaea6
Compare
|
I have reverted any changes to |
|
Looks good to me from the gutenberg-mobile POV so, I'll leave it to @loremattei or @jkmassel to test out the release process to see if the generated strings file works fine there. While at it @loremattei , I wonder if it would be easy to modify the release scripts to look for |
| // Filter out all strings that are not prefixed with `gutenberg_mobile_` | ||
| if (!fieldName.startsWith("gutenberg_mobile_")) { | ||
| // Filter out all strings that are not prefixed with `gutenberg_native_` | ||
| if (!fieldName.startsWith("gutenberg_native_")) { |
There was a problem hiding this comment.
Given this change we actually need to update values/strings.xml in this PR if we don't want to lose the gutenberg translations in the next release.
There was a problem hiding this comment.
Let's target #10769 instead of develop se we can have access to the gutenberg-mobile strings.xml and thus re-generate the main strings.xml
46214ff to
e89767d
Compare
|
Updated to target |
85bd2bb to
e64e860
Compare
|
Hey @Tug! This looks good to me. I tested it and it works as expected. I just have a question about the process as I'm not sure we ended up with an answer in the chats I saw: when are we going to run this script? Do we update the strings as a part of the PR that updates the
@hypest I'm not sure what you mean here 🤔I think @Tug and @mchowning explored the possibility of uploading more than one file to GlotPress and it turned out to be not possible... but if you meant something different, let me know. |
This reverts commit cfeaea6.
…utenberg/fix-i18n
What I meant is to script/generate a single file out of the two I'm proposing, and send the unified file to GlotPress. |
Fixes wordpress-mobile/gutenberg-mobile#939
Gutenberg PR: wordpress-mobile/gutenberg-mobile#1520
This PR automates adding gutenberg mobile strings to the main
strings.xmlfiles in order to have those translated by glotpress. It also adds support for plurals inGutenbergEditorFragment(need to check that glotpress can parse<plurals>tags).Testing Instructions
develop)python tools/merge_strings_xml.pyWordPress/src/main/res/values/strings.xmland make sure it contains all the strings from gutenberg-mobile/bundle/androidPR submission checklist:
Update the release process when the PR lands.
I have considered adding unit tests where possible.
I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.