You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if no implementation exists for Intl.PluralRules, this plugin will throw an exception, which will potentially crash the application and display no content.
We could instead potentially fall back to some basic pluralization functionality, which, if potentially incorrect, would be a better end user experience.
Solution proposal
If no implementation exists for Intl.PluralRules:
Log an error
Implement basic English pluralization rules to select a "preferred" key, and attempt to find a matching key based on that and a list of pluralization keys in order of most common for most locales and use cases to least common.
^ Basically it'll attempt to find the most appropriate subkey according to English rules. Assume subKeys is a list of subkeys you've gotten from the translation file already.
The key order in this list is off-hand; we should consult with localization experts on the ideal order of the array, as to which pluralization subkeys are the "least bad" to have returned if "one" or "other" can't be found.
The text was updated successfully, but these errors were encountered:
Currently, if no implementation exists for
Intl.PluralRules
, this plugin will throw an exception, which will potentially crash the application and display no content.We could instead potentially fall back to some basic pluralization functionality, which, if potentially incorrect, would be a better end user experience.
Solution proposal
If no implementation exists for
Intl.PluralRules
:Sample implementation:
^ Basically it'll attempt to find the most appropriate subkey according to English rules. Assume
subKeys
is a list of subkeys you've gotten from the translation file already.The key order in this list is off-hand; we should consult with localization experts on the ideal order of the array, as to which pluralization subkeys are the "least bad" to have returned if "one" or "other" can't be found.
The text was updated successfully, but these errors were encountered: