Пример #1
0
def key_plural_keywords(x):
    """Extracts CLDR plural keywords index starting with 'zero'
    and ending with 'other'."""
    return PLURAL_TAGS.index(x) if x in PLURAL_TAGS else -1
Пример #2
0
def key_plural_keywords(x):
    """Extracts CLDR plural keywords index starting with 'zero'
    and ending with 'other'."""
    return PLURAL_TAGS.index(x) if x in PLURAL_TAGS else -1
Пример #3
0
def sort_plural_keywords(x, y):
    """Comparator that sorts CLDR  plural keywords starting with 'zero'
    and ending with 'other'."""
    return cmp(PLURAL_TAGS.index(x) if x in PLURAL_TAGS else -1, PLURAL_TAGS.index(y) if y in PLURAL_TAGS else -1)
Пример #4
0
def sort_plural_keywords(x, y):
    """Comparator that sorts CLDR  plural keywords starting with 'zero'
    and ending with 'other'."""
    return cmp(
        PLURAL_TAGS.index(x) if x in PLURAL_TAGS else -1,
        PLURAL_TAGS.index(y) if y in PLURAL_TAGS else -1)