コード例 #1
0
ファイル: convert.py プロジェクト: shumidub/android2po
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
ファイル: convert.py プロジェクト: bartbutler/android2po
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
ファイル: convert.py プロジェクト: vvz/android2po
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
ファイル: convert.py プロジェクト: slovenec88/android2po
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)