Skip to content

Commit b7c663a

Browse files
Document Intl.PluralRules in comments
There's a standard solution for pluralization, but I don't think we need it. Document the standard solution, in case we need to use it later. Signed-off-by: David A. Wheeler <[email protected]>
1 parent aece492 commit b7c663a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/labs/checker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,11 @@ const GIVE_UP_DELAY_TIME = 60;
576576
// not-1 to 1, which is unlikely. However,
577577
// for some languages like Arabic, Hebrew, and Russian it's more complicated.
578578
// See: https://localizely.com/language-plural-rules/
579+
// If we needed to, we could use JavaScript's Intl.PluralRules
580+
// which is widely supported and addresses this (unless you use IE),
581+
// but at this point there's no evidence we need it. See:
582+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules
583+
// https://caniuse.com/mdn-javascript_builtins_intl_pluralrules
579584
const HINT_DELAY_TIME = 15;
580585

581586
/** return time (in seconds) since start and/or last hint */

0 commit comments

Comments
 (0)