lgalfaso / angular-dynamic-locale

Module to be able to change the locale at an angularjs application
http://lgalfaso.github.io/angular-dynamic-locale/
MIT License
322 stars 75 forks source link

Bug with pluralization since angularjs 1.3.4 #91

Open osmininmk opened 8 years ago

osmininmk commented 8 years ago

Ng pluralize didn't update inner locale on dynamic update, everthing else works fine. There is plunker example with bug: http://plnkr.co/edit/4JDVdEuAjlbU6nS89dqG After switch to Russian language ng pluralize didn't udpate. After chagngin angular version to 1.3.3 ng-pluralize works.

lgalfaso commented 8 years ago

It is very unfortunate, but it looks like ngPluralize is not able to handle locale changes any more. Here is a way to work around this issue using a decorator

http://plnkr.co/edit/LonYZqpw0lfzWViqppi8?p=preview

Unfortunately, the nature of the change makes it unsuitable for it to make it into angular repository.