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
feat(compiler): add location note to extracted xliff2 files #16791
Conversation
27e88a8
to
7237cb8
Compare
@@ -88,17 +88,25 @@ const EXPECTED_XLIFF2 = `<?xml version="1.0" encoding="UTF-8" ?> | |||
<notes> | |||
<note category="description">desc</note> | |||
<note category="meaning">meaning</note> | |||
<note category="location">src/basic.ts:1</note> |
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.
could you add a link to the spec in the commit message
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.
added
LGTM if this conforms to the spec, please add a link in the commit message |
7237cb8
to
4c29acb
Compare
4c29acb
to
b49d480
Compare
Add source location as a note tag as `<note category="location">path/to/file.ts:start_line[,end_line]</note>`. `[,end_line]` part is optional and specified only if the end line is different from the start line. Fixes angular#16531
b49d480
to
978028b
Compare
|
||
if (message.description || message.meaning) { | ||
const notes = new xml.Tag('notes'); |
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.
@ocombe According to the XLIFF 2.0 spec, <notes>
must have one or more <note>
element. So, an empty <notes>
is not valid according to the schema.
http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html#notes
You can use this schema validator for testing.
http://okapi-lynx.appspot.com/validation
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.
it will never be empty since it will contain the url of the source file
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.
Hmm... I guess the location will never be empty. This would be okay...
…16791) Add source location as a note tag as `<note category="location">path/to/file.ts:start_line[,end_line]</note>`. `[,end_line]` part is optional and specified only if the end line is different from the start line. Fixes angular#16531
…16791) Add source location as a note tag as `<note category="location">path/to/file.ts:start_line[,end_line]</note>`. `[,end_line]` part is optional and specified only if the end line is different from the start line. Fixes angular#16531
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. |
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
If ngcc gets updated to a new version then the artifacts left in packages that were processed by the previous version are possibly invalid. Previously we just errored if we found packages that had already been processed by an outdated version. Now we automatically clean the packages that have outdated artifacts so that they can be reprocessed correctly with the current ngcc version. Fixes angular#16791
What kind of change does this PR introduce?
What is the current behavior?
When we added the xliff2 serializer, we forgot to add the source location at the same time because both PR were merged at about the same time.
See #16531
What is the new behavior?
This PR adds a note with the location of source files to the xliff2 units of extracted files.
Does this PR introduce a breaking change?