Specify domain when extracting strings from Jetpack and Layout Grid#4409
Merged
Conversation
fluiddot
commented
Dec 29, 2021
| <string name="gutenberg_native_build_layouts" tools:ignore="UnusedResources">Build layouts</string> | ||
| <string name="gutenberg_native_button_link_url" tools:ignore="UnusedResources">Button Link URL</string> | ||
| <string name="gutenberg_native_button_position" tools:ignore="UnusedResources">Button position</string> | ||
| <string name="gutenberg_native_cancel" tools:ignore="UnusedResources">Cancel</string> |
Contributor
Author
fluiddot
commented
Dec 29, 2021
| <string name="gutenberg_native_take_a_video" tools:ignore="UnusedResources">Take a Video</string> | ||
| <string name="gutenberg_native_tap_here_to_show_help" tools:ignore="UnusedResources">Tap here to show help</string> | ||
| <string name="gutenberg_native_tap_to_hide_the_keyboard" tools:ignore="UnusedResources">Tap to hide the keyboard</string> | ||
| <string name="gutenberg_native_text_color" tools:ignore="UnusedResources">Text color</string> |
Contributor
Author
There was a problem hiding this comment.
This is a new string that has been recently added (PR reference).
2 tasks
Contributor
|
Hey, @fluiddot . We will cut the |
jhnstn
approved these changes
Jan 4, 2022
Member
jhnstn
left a comment
There was a problem hiding this comment.
Looks good, npm run genstrings executed as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that we're adding the string
Cancelin the localization strings files, which is referenced in the Layout Grid plugin (file reference). The string is retrieved from the default domain, which in this case it would be Gutenberg, and it's already translated in the GlotPress project (reference), so we shouldn't really add it.The
makepotcommands we use for extracting the strings from plugins like Jetpack and Layout Grid were ignoring the domain, which like theCancelstring case, they might include undesired extra strings into the localization strings files. This PR updates those commands and specify a domain for those plugins to prevent this behavior.NOTE: A side effect of this change, although I guess it's expected, is that strings referencing a different domain than the one associated with the plugin (i.e. Jetpack references the
jetpackdomain) retrieved in*.native.jsfiles of plugins, won't be included in the localization strings files.To test:
npm run genstrings.bundle/ios/GutenbergNativeTranslations.swiftandbundle/android/strings.xml) remain unmodified.PR submission checklist: