-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngPluralize throws "TypeError: undefined is not a function" when including locale file #7774
Comments
It's hard to find a problem without some code that reproduces it. Can you provide us a simple plnkr that reproduces the issue? |
I'm using ng-pluralize in two locations, both with defined numerical values
|
You closed the issue. Is it because you found a solution? |
Happened to me as well with Angular 1.3.3 and polish language bundle.
|
@lgalfaso: Do you think it is a good idea to "default" to |
@gkalpak we should not default to |
@lgalfaso Such approach requires explicit definition of all keys, even thought it's not necessary. Take this for example:
Why shouldn't we default to |
That is not true as it depends on the language |
@lgalfaso yes it does, but it is still IMO far better to see incorrect grammatical form with some information in it (lets say "5 godziny" where proper form would be "5 godzin") than empty string which conveys no message... that's my line of thinking at least. |
@Sija every other library that I know about that handles plurals do not default to other when a key is missing. This includes android, iOS, the ICU project... Now, if the problem is to detect these, then I would agree that it would be nice to generate a warning when being asked for rule and it is missing |
@lgalfaso fair enough! +1 for warning in case of missing pluralization keys |
I'm on Angular 1.2.6 (but a quick upgrade test did nothing) using a french locale bundle
Here's a snapshot of my bower file:
And the error in question:
The rest of the locale bundle seems to work, but the pluralize directive isn't using it.
The text was updated successfully, but these errors were encountered: