fix: unable extract translation messages #1646
Closed
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.
Description
There are some issues in the translation messages extraction
formatjs extract
command is failing when a large number of override files are present, exceeding the maximum allowed command length.--ignore
option is designed to accept glob patterns. By using a list of absolute file paths will not matching any files. Thereforce, no files being ignored.Types of Changes
Changes
--ignore
option from the commandextends
packages, messages in theoverrides
folder take precedence over existing keys from other packages.If we look at the implementation history, there's a solution that renames overridden files to
{filename}.ignore
before running theextract
command. This is a great idea in principle, but it can lead to unexpected issues if:.ignore
and an error occurs during execute the command (e.g., I/O exceptions, extraction failure, etc.)In these cases, developers might be left completely puzzled about why a file in
node_modules
is missing. Debugging this issue could take a whole day and might only be resolved by deleting thenode_modules
folder and reinstalling dependencies.Checklists
General
Accessibility Compliance
Localization
Close #1645