Navigation Menu

Skip to content
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

Merged
merged 1 commit into from May 22, 2017

Conversation

ocombe
Copy link
Contributor

@ocombe ocombe commented May 15, 2017

What kind of change does this PR introduce?

[x] Bugfix

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?

[x] No

@ocombe ocombe requested a review from vicb May 15, 2017 12:34
@ocombe ocombe mentioned this pull request May 15, 2017
20 tasks
@ocombe ocombe force-pushed the feature-xliff2-source-16531 branch from 27e88a8 to 7237cb8 Compare May 15, 2017 13:00
@@ -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>
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@vicb
Copy link
Contributor

vicb commented May 15, 2017

LGTM if this conforms to the spec, please add a link in the commit message

@vicb vicb added area: i18n action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 16, 2017
@ocombe ocombe force-pushed the feature-xliff2-source-16531 branch from 7237cb8 to 4c29acb Compare May 17, 2017 13:42
@ocombe ocombe added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 17, 2017
@mary-poppins
Copy link

The angular.io preview for 4c29acb is available here.

@vicb vicb added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label May 17, 2017
@ocombe ocombe force-pushed the feature-xliff2-source-16531 branch from 4c29acb to b49d480 Compare May 17, 2017 18:00
@mary-poppins
Copy link

The angular.io preview for b49d480 is available here.

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
@ocombe ocombe force-pushed the feature-xliff2-source-16531 branch from b49d480 to 978028b Compare May 18, 2017 16:20
@mary-poppins
Copy link

The angular.io preview for 978028b is available here.

@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: review The PR is still awaiting reviews from at least one requested reviewer labels May 18, 2017
@ocombe ocombe changed the title fix(compiler): add location note to extracted xliff2 files feat(compiler): add location note to extracted xliff2 files May 18, 2017
@chuckjaz chuckjaz merged commit 08dfe91 into angular:master May 22, 2017

if (message.description || message.meaning) {
const notes = new xml.Tag('notes');
Copy link

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

Copy link
Contributor Author

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

Copy link

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...

@ocombe ocombe deleted the feature-xliff2-source-16531 branch June 8, 2017 08:20
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
…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
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
…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
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Jan 31, 2020
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: i18n cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants