def _get_plural_forms(js_translations):
    plural = None
    n_plural = 2
    if '' in js_translations._catalog:
        for l in js_translations._catalog[''].split('\n'):
            if l.startswith('Plural-Forms:'):
                plural = l.split(':', 1)[1].strip()
                print "plural is %s" % plural
    if plural is not None:
        for raw_element in plural.split(';'):
            element = raw_element.strip()
            if element.startswith('nplurals='):
                n_plural = int(element.split('=', 1)[1])
            elif element.startswith('plural='):
                plural = element.split('=', 1)[1]
                print "plural is now %s" % plural
    else:
        n_plural = 2
        plural = '(n == 1) ? 0 : 1'
    return plural, n_plural
This implements searches like 'if query in cmd'. It's a fuzzy
dataset/ETHPy150Open GoogleCloudPlatform/python-docs-samples/appengine/i18n/i18n_utils.py/_get_plural_forms--crossover with--dataset/ETHPy150Open evennia/evennia/evennia/commands/command.py/Command.__contains__