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
fix(localize): relax error to warning for missing target #41944
fix(localize): relax error to warning for missing target #41944
Conversation
Some localization workflows want to use the extracted source translation files directy back in the project as a target translation file. The extraction process generates files that only contain "source" messages and not "target" messages. This is actually valid for most translation formats but currently the Angular localization process expects target translation files to always contain target messages and will stop with an error in this case. Now, instead of an error, the translation file loader will log a warning, and then try to falback to a source message, only erroring if this is also missing. Fixes angular#21690
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Note: not sure what the change was in tests (the diff is ~3K lines). I assume it's mostly formatting?
Oh man! It was one of those things where adding a few more lines makes the formatter go crazy. I couldn't even split it into two commits, because removing the change resulted in no reformatting! You could try https://github.com/angular/angular/pull/41944/files?diff=split&w=1 if you like. |
@petebacondarwin I see the diff correctly now (without whitespaces), thanks :) The changes look good. |
Some localization workflows want to use the extracted source translation files directy back in the project as a target translation file. The extraction process generates files that only contain "source" messages and not "target" messages. This is actually valid for most translation formats but currently the Angular localization process expects target translation files to always contain target messages and will stop with an error in this case. Now, instead of an error, the translation file loader will log a warning, and then try to falback to a source message, only erroring if this is also missing. Fixes #21690 PR Close #41944
Some localization workflows want to use the extracted source translation files directy back in the project as a target translation file. The extraction process generates files that only contain "source" messages and not "target" messages. This is actually valid for most translation formats but currently the Angular localization process expects target translation files to always contain target messages and will stop with an error in this case. Now, instead of an error, the translation file loader will log a warning, and then try to falback to a source message, only erroring if this is also missing. Fixes #21690 PR Close #41944
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Some localization workflows want to use the extracted source translation
files directy back in the project as a target translation file.
The extraction process generates files that only contain "source" messages
and not "target" messages. This is actually valid for most translation formats
but currently the Angular localization process expects target translation files
to always contain target messages and will stop with an error in this case.
Now, instead of an error, the translation file loader will log a warning,
and then try to falback to a source message, only erroring if this is also
missing.
Fixes #21690