Skip to content

i18n: numbers for select-icu fail to compile (template parse error) #17799

@actra-gschuster

Description

@actra-gschuster

I'm submitting a ...


[ ] Regression (behavior that used to work and stopped working in a new release)
[ x ] Bug report 
[ ] Feature request
[ ] 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

Given this code {gender, select, m {male} f {female}} the app compiles correctly.
Changing it to a number ({gender, select, 1 {male} f {female}} fails with a template parse error:

Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("
    <br /><br />
</div>[ERROR ->]"): ng:///ThemeModule/ThemeComponent.html@46:6
Invalid ICU message. Missing '}'. ("
    SELECT START {gender, select, [ERROR ->]1 {male} f {female}} SELECT END
</span>
<div>
"): ng:///ThemeModule/ThemeComponent.html@6:31
Invalid ICU message. Missing '}'. ("
    
    <br /><br />
</div>[ERROR ->]"): ng:///ThemeModule/ThemeComponent.html@46:6

Expected behavior

Should handle numbers as strings and display correctly.

Minimal reproduction of the problem with instructions

Drop in the example from above in any working ng4-project.

Please tell us about your environment


Angular version: 4.2.4
Browser: Chrome (Windows 10) version 58

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationtype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions