Skip to content

ICU messages don't work on attributes #21615

@Goodwine

Description

@Goodwine

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When I try to use ICU syntax in a translated attribute (like placeholder) I get an error:
Template parse errors: Unexpected translation for attribute "placeholder" (id="...

Expected behavior

Either a) nothing fails, everything works! or b) Fail more gracefully telling me this is not supported and make a note of this in the documentation.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-xafhzk?file=app/autocomplete-overview-example.html
https://angular-xafhzk.stackblitz.io

<input placeholder="{foo, select, bar{a} baz{b} other{c}}" i18n-placeholder>

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

i'm forced to do this in different ways, like goog.getMsg. I'd like not to do this and have a consistent way of doing stuff.

Environment


Angular version: 5.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: docsRelated to the documentationarea: i18nIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under considerationfreq2: mediumhotlist: error messages

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions