Fix string extraction for Webpack function renaming#11775
Merged
Conversation
changelog: Internal, Localization, Improve reliability of JavaScript string extraction
solipet
approved these changes
Jan 17, 2025
Contributor
solipet
left a comment
There was a problem hiding this comment.
Tested the regex change witih https://regex101.com/r/DBJqyc/1
shanechesnutt-ft
approved these changes
Jan 17, 2025
Contributor
shanechesnutt-ft
left a comment
There was a problem hiding this comment.
Ran the production build locally and everything looks good to me!
Contributor
|
Thanks for fixing this. 🙏🏻 |
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.
🛠 Summary of changes
Updates Webpack i18n string extraction to match on a pattern of Webpack renamed source code for references to
tin@18f/identity-i18n.Example source:
This isn't an especially resilient solution, but since we don't currently operate on the raw source of the files, we have to try to extract with some transformations from Webpack and Babel applied (see related #6359).
Related Slack thread: https://gsa-tts.slack.com/archives/C03FA4VBN76/p1737138493859829
📜 Testing Plan
Verify that production-optimized build includes previously-missing strings in output.
The result of the
findcommand should be non-empty. (Onmain, the result is empty)