-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(i18n): expand the MessageFormat syntax documentation #11576
Conversation
@petebacondarwin—I also have a bugfix for MessageFormat that needs to go in this release. I also missed the bower publish/unpublish for this module that I'll be adding (also a separate PR.) |
@@ -18,8 +18,10 @@ application means providing translations and localized formats for the abstracte | |||
Angular supports i18n/l10n for {@link ng.filter:date date}, {@link ng.filter:number number} and | |||
{@link ng.filter:currency currency} filters. | |||
|
|||
Additionally, Angular supports localizable pluralization support through the {@link | |||
ng.directive:ngPluralize `ngPluralize` directive}. | |||
Localizable pluralization is supported via the {@link ng.directive:ngPluralize `ngPluralize` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chirayuk do you think we should deprecate ngPluralize in 1.5 and put it in its own separate module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't done that because I had mistakenly assumed that ngPluralize allowed its embedded messages to contain HTML. Reading the docs and testing on plnkr.co shows that that is not the case.
So yes, we should definitely deprecate this for 1.5! Should I say something about it in the docs for 1.4 right now?
This looks great @chirayuk! |
|
||
#### Selection Keywords | ||
|
||
The selection keywords can be either exact matches or language dependant [plural |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependant --> dependent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
I like this (I originally thought MessageFormat would be complex to use, but it turns out it is pretty much straight-forward). 👍 @chirayuk Apart from the minor inline comments, I have a couple (not so minor ?) not-inline comments/questions/remarks:
@chirayuk, let me know if you would like me to open separate issues. |
0eb56ef
to
2ef0dde
Compare
LGTM |
@gkalpak for your second point, I wonder if the capitalization of the module name is being changed by dgeni when generating that page... |
2ef0dde
to
383ffb7
Compare
@gkalpak—regarding your comments: The minified version bug has been fixed in a PR with an E2E test for it. See PR 11592. The casing—I fixed the only place it was inconsistently cased and made it part of this PR. However, that does not fix the problem because the stuff generated in the Would you file two issues for this—(1) casing should be changed to lowercase everywhere for consistency, (2) for me to create the bower repository and update |
On bower repo/module file name casing: I'm going to go with bower-angular-message-format and angular-message-format.min.js. based on chatting with @IgorMinar and @btford. This avoid the issue of casing that might affect case insensitive filesystem and has better consistency with names in URLs (i.e. using the hyphen as the separator character.) Let me know if you have other thoughts. |
220491c
to
c2c9300
Compare
@chirayuk, I see you have already opened the issues. |
c2c9300
to
a240d72
Compare
@gkalpak @petebacondarwin the rename to |
a240d72
to
1a0bcb1
Compare
No description provided.