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

Support ICU message for xliff #12636

Closed
Foxandxss opened this issue Oct 31, 2016 · 5 comments
Closed

Support ICU message for xliff #12636

Foxandxss opened this issue Oct 31, 2016 · 5 comments
Labels
area: i18n feature Issue that requests a new feature freq2: medium

Comments

@Foxandxss
Copy link
Member

Foxandxss commented Oct 31, 2016

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

[x] bug report => search github for a similar issue or PR before submitting
[ ] 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

Using something like <div i18n id="i18n-7">{count, plural, =0 {zero} =1 {one} =2 {two} other {<b>many</b>}}</div> in the case of other it prints many.

Expected behavior

it should print <b>many</b>. It is omitting the html part.

Minimal reproduction of the problem with instructions

http://plnkr.co/edit/ucuVZuhU67Ul64ViUSa8?p=preview

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

It is a bug :)

  • Angular version: 2.1.2
  • 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 ]

Chrome

  • Language: Typescript

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

@Foxandxss
Copy link
Member Author

ping @vicb

@vicb vicb changed the title HTML code inside i18n plural doesn't work Support ICU message for xliff Oct 31, 2016
@vicb vicb added feature Issue that requests a new feature area: i18n freq2: medium labels Oct 31, 2016
@kemsky
Copy link

kemsky commented Nov 1, 2016

This is good point no doubt. My concern is overall state of i18n. It has to be carefully designed to work nicely with rich template syntax as well as AOT compilation and localization formats.

@marclaval
Copy link
Contributor

I've been looking into that, the biggest challenge is to find a format to serialize ICU messages into XLIFF, knowing that this format should be compatible with translation tools.

I did some research which is documented here: https://docs.google.com/document/d/1FS02wIBSEbysCoxEqbEmJg3_LyfJ566DZLhhbOUheoA/edit?usp=sharing

Feedback is more than welcome :)

@marclaval
Copy link
Contributor

@panuruj Based on your work on XLIFF 2.0 support, I can imagine that you are a heavy XLIFF user and we could use your expertise to solve this issue :)

Would you use ICU messages if they were available for XLIFF? Would you recommend one of the format I've documented above?
We are currently leaning towards solution 4, which is basically pasting the full ICU message into the XLIFF file and letting the translator take care of it ...

If you don't mind, it would be also interesting to understand how you handle plural cases in your applications.

marclaval added a commit to marclaval/angular that referenced this issue Mar 10, 2017
marclaval added a commit to marclaval/angular that referenced this issue Mar 13, 2017
@vicb vicb closed this as completed in b8d5f87 Mar 24, 2017
sjtrimble pushed a commit to sjtrimble/angular that referenced this issue Mar 25, 2017
@ocombe ocombe mentioned this issue May 2, 2017
20 tasks
asnowwolf pushed a commit to asnowwolf/angular that referenced this issue Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this issue Aug 28, 2017
@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 feature Issue that requests a new feature freq2: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants