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

i18n XLIFF 2.0 serializer should add source files #16531

Closed
martinroob opened this issue May 4, 2017 · 3 comments
Closed

i18n XLIFF 2.0 serializer should add source files #16531

martinroob opened this issue May 4, 2017 · 3 comments
Assignees
Labels
area: i18n effort1: hours feature Issue that requests a new feature

Comments

@martinroob
Copy link

martinroob commented May 4, 2017

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[X] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
Starting with angular 4.1 there is the new XLIFF 2.0 serializer available (#14185).
And there is also the new feature for writing a source reference into the xlf and xmb files (#14705).
But in XLIFF 2.0 this reference to source is not written.

Expected behavior
Add functionality for #14705 to the new XLIFF 2.0 serializer.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 4.1.X

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@vicb vicb added the area: i18n label May 4, 2017
@vicb vicb added the feature Issue that requests a new feature label May 4, 2017
@ocombe ocombe mentioned this issue May 4, 2017
20 tasks
@martinroob
Copy link
Author

Just as a hint for implemting it.
In principle this information should be stored in the resourceData part.
But this is very complex and difficult to use.

So it migth be easier to just put source file and line information to a note element.

Something like this:

    <unit id="1409816038285774052">
      <notes>
        <note category="description">description</note>
        <note category="meaning">meaning</note>
	<note category="location">/home/user/sampleapp/src/app/app.component.ts:10</note>
      </notes>
      <segment>
        <source>My text</source>
      </segment>
    </unit>

@martinroob
Copy link
Author

Oops, I did not want to close it.

@martinroob martinroob reopened this May 5, 2017
ocombe added a commit to ocombe/angular that referenced this issue May 15, 2017
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.
This PR adds a note with the location of source files to the xliff2 units of extracted files.

Fixes  angular#16531
ocombe added a commit to ocombe/angular that referenced this issue May 15, 2017
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.
This PR adds a note with the location of source files to the xliff2 units of extracted files.

Fixes  angular#16531
ocombe added a commit to ocombe/angular that referenced this issue May 17, 2017
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.
This PR adds a note with the location of source files to the xliff2 units of extracted files.
There is no clear definition of where to store the location of the source files in the official XLIFF 2.0 specification (http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html) so we decided to add it to the notes section, since it was simple to implement/understand and already present for meaning/description.
The location note is defined like this: `<note category="location">path/to/file.ts:1,2</note>`. It gives the path, followed by start line, and last line if different from the start line.

Fixes  angular#16531
ocombe added a commit to ocombe/angular that referenced this issue May 17, 2017
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 added a commit to ocombe/angular that referenced this issue May 18, 2017
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
asnowwolf pushed a commit to asnowwolf/angular that referenced this issue 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 issue 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: i18n effort1: hours feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

3 participants