Lang.js icon indicating copy to clipboard operation
Lang.js copied to clipboard

Default Plural Form Support

Open aalmonte opened this issue 7 years ago • 2 comments

@rmariuzzo Please consider this change

Adds a default plural form support for use with locales not listed in getPluralForm function.

aalmonte avatar Nov 29 '17 15:11 aalmonte

Hey @aalmonte! As I could read you want the default plural form to be the first entry if none was found?

rmariuzzo avatar Nov 29 '17 16:11 rmariuzzo

Hi @rmariuzzo not really. This change supports the case in which locale is set to a value not considered in switch cases of __getPluralForm function. In that case the plural form is considered to be the first part of the message for count == 1 and the second for other cases. Also I added a check inside choice function to see if the plural form exists in current message.

aalmonte avatar Nov 29 '17 16:11 aalmonte