The angular <eg-confirm-dialog> ignores i18n plural syntax in the dialogBody attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The angular documentation describes some interesting things you can do with plural expressions: https:/
Based on that documentation, it seems like you should be able to write the following and have it choose the appropriate substring based on the value of numThings:
<eg-confirm-dialog #numberConfirmD
i18n-dialogTitle i18n-dialogBody
dialogTitle=
dialogBody="Are you sure you want to confirm {numThings, plural, =1 {this thing} other {these {{numThings}} things}}?">
</eg-confirm-
However, no matter the value of numThings, the confirm-dialog always just reads "Are you sure you want to confirm " and skips the rest of the string. :-(
Here's an example branch that adds some buttons to the bottom of the sandbox. Expected behavior is that you can click on the buttons and get a confirmation that repeats the number you clicked on, with appropriate plural or singular i18n. It's possible that I'm doing something wrong here, too, so let me know! Here's the branch: http://
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (berick) |
status: | New → Confirmed |
Changed in evergreen: | |
importance: | Undecided → Medium |
status: | Fix Committed → Fix Released |
Sorry, wrong link to the documentation. Should be this instead: https:/ /angular. io/guide/ i18n#regular- expressions- for-plurals- and-selections