Skip to content

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

Closed

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

Activity

  1. added a commit that references this issue on Jul 26, 2017
    a8ac77b
  2. added a commit that references this issue on Aug 11, 2017
    8f6d51b
  3. added 2 commits that reference this issue on Aug 26, 2017
    cc01e90
    0b6c969
  4. angular-automatic-lock-bot commented on Sep 12, 2019

    @angular-automatic-lock-bot

    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.

  5. locked and limited conversation to collaborators on Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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