mwg API
    Preparing search index...

    Function pluralFormCoverage

    • How many of a catalog's plural-form messages define each CLDR category - 'few'/'many' sitting at 0 while 'other' covers every key is exactly the gap a language needing those categories (Polish, Arabic) would otherwise only discover once a player hit the wrong count.

      Parameters

      Returns PluralCoverage

      import { pluralFormCoverage } from '@datamoc/mw_games/i18n';

      const catalog = {
      locale: 'en', direction: 'ltr' as const,
      messages: { items: { one: '{count} item', other: '{count} items' } },
      };

      pluralFormCoverage(catalog); // { pluralKeys: 1, formsPresent: { one: 1, other: 1 } }