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
Impossible to use i18n pluralization #13780
Comments
Known issue: ICU messages are not yet supported in xliff |
OK. Thanks for the clarification. This is not very clear in the documentation, which indeed mentions a lack of support, but nevertheless shows examples and gives explanations about translating them, using xliff. |
BTW, couldn't we leave this issue opened if it's indeed an issue, because a search on open issues on i18n / ICU doesn't bring anything, which tends to suggest that the issue isn't known, or is fixed already. Instead, there are issues like #12636, which also tend to suggest that ICU is working, except for HTML support. |
Please open a bug on angular/angular.io
We already have issues tracking this 12636 is one of them, there are other. GH search sucks for issue and there's nothing I can for for that, sorry. FYI the main thing here is to figure out how the ICU messages should be serialized in xliff. If anybody has some pointers the impl is trivial. (might be as easy as create a .po and convert it to xliff with Virtaal or any other tools) |
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. |
I'm submitting a ... (check one with "x")
Current behavior
Building a bundle with plural messages translations fail
Expected behavior
The bundle would be built successfully
Minimal reproduction of the problem with instructions
I tried using the pluralization support using the following template snippet:
Extracting the i18n messages works (almost) fine: two
trans-unit
elements are generated: one for the whole message, and one for the pluralization part, but without any source value:However, if I translate these two trans-units and then build the application, it complains that a message is not translated, but with an unrelated, and unexisting ID:
Note that replacing the generated ID (44a0e07b720aebe2fdf15b27e3f9200f3b324dcd) by the one suggested in the error message (1c59e50923d54ca365fdcbd95258b4310dc9ad0f) makes the compiler complain about a missing translation for the generated ID. I have to translate the message twice, using the two IDs, to make it work as expected.
Please tell us about your environment:
MacOS X Sierra, following versions:
Angular version: 2.4.1
Browser: NA
Language: TypeScript 2.0.10
Node (for AoT issues):
node --version
= 6.9.2The text was updated successfully, but these errors were encountered: