mirror of https://gitlab.com/bashrc2/epicyon
gender or pronoun tag
parent
ce75a26a3c
commit
dd3d4d27fc
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "هو",
|
||||
"She/Her": "هي",
|
||||
"girl": "فتاة",
|
||||
"boy": "صبي"
|
||||
"boy": "صبي",
|
||||
"pronoun": "ضمير"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Ell",
|
||||
"She/Her": "Ella",
|
||||
"girl": "noia",
|
||||
"boy": "noi"
|
||||
"boy": "noi",
|
||||
"pronoun": "pronom"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Ef",
|
||||
"She/Her": "Hi/Ei",
|
||||
"girl": "merch",
|
||||
"boy": "bachgen"
|
||||
"boy": "bachgen",
|
||||
"pronoun": "rhagenw"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Er/ihm",
|
||||
"She/Her": "Sie",
|
||||
"girl": "mädchen",
|
||||
"boy": "junge"
|
||||
"boy": "junge",
|
||||
"pronoun": "pronomen"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "He/Him",
|
||||
"She/Her": "She/Her",
|
||||
"girl": "girl",
|
||||
"boy": "boy"
|
||||
"boy": "boy",
|
||||
"pronoun": "pronoun"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "El",
|
||||
"She/Her": "Ella",
|
||||
"girl": "muchacha",
|
||||
"boy": "niño"
|
||||
"boy": "niño",
|
||||
"pronoun": "pronombre"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Il/Lui",
|
||||
"She/Her": "Elle",
|
||||
"girl": "fille",
|
||||
"boy": "garçon"
|
||||
"boy": "garçon",
|
||||
"pronoun": "pronom"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Sé/Eisean",
|
||||
"She/Her": "Sí",
|
||||
"girl": "cailín",
|
||||
"boy": "buachaill"
|
||||
"boy": "buachaill",
|
||||
"pronoun": "forainm"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "वह/उसे",
|
||||
"She/Her": "वह/उसकी",
|
||||
"girl": "लड़की",
|
||||
"boy": "लड़का"
|
||||
"boy": "लड़का",
|
||||
"pronoun": "सवर्नाम"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Lui",
|
||||
"She/Her": "Lei",
|
||||
"girl": "ragazza",
|
||||
"boy": "ragazzo"
|
||||
"boy": "ragazzo",
|
||||
"pronoun": "pronome"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "彼",
|
||||
"She/Her": "彼女",
|
||||
"girl": "女の子",
|
||||
"boy": "男の子"
|
||||
"boy": "男の子",
|
||||
"pronoun": "代名詞"
|
||||
}
|
||||
|
|
|
@ -382,5 +382,6 @@
|
|||
"He/Him": "He/Him",
|
||||
"She/Her": "She/Her",
|
||||
"girl": "girl",
|
||||
"boy": "boy"
|
||||
"boy": "boy",
|
||||
"pronoun": "pronoun"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Ele",
|
||||
"She/Her": "Ela",
|
||||
"girl": "garota",
|
||||
"boy": "garoto"
|
||||
"boy": "garoto",
|
||||
"pronoun": "pronome"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "Он/Его",
|
||||
"She/Her": "Она/Ее",
|
||||
"girl": "девочка",
|
||||
"boy": "мальчик"
|
||||
"boy": "мальчик",
|
||||
"pronoun": "местоимение"
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@
|
|||
"He/Him": "他",
|
||||
"She/Her": "她",
|
||||
"girl": "女孩",
|
||||
"boy": "男生"
|
||||
"boy": "男生",
|
||||
"pronoun": "代词"
|
||||
}
|
||||
|
|
15
utils.py
15
utils.py
|
@ -678,6 +678,7 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
|
|||
if not personCache.get(actor):
|
||||
return None
|
||||
bioFound = None
|
||||
pronounStr = translate['pronoun'].lower()
|
||||
if personCache[actor].get('actor'):
|
||||
# is gender defined as a profile tag?
|
||||
if personCache[actor]['actor'].get('attachment'):
|
||||
|
@ -692,6 +693,9 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
|
|||
translate['gender'].lower():
|
||||
bioFound = tag['value']
|
||||
break
|
||||
elif tag['name'].lower().startswith(pronounStr):
|
||||
bioFound = tag['value']
|
||||
break
|
||||
# if not then use the bio
|
||||
if not bioFound and personCache[actor]['actor'].get('summary'):
|
||||
bioFound = personCache[actor]['actor']['summary']
|
||||
|
@ -715,6 +719,9 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
|
|||
translate['gender'].lower():
|
||||
bioFound = tag['value']
|
||||
break
|
||||
elif tag['name'].lower().startswith(pronounStr):
|
||||
bioFound = tag['value']
|
||||
break
|
||||
# if not then use the bio
|
||||
if not bioFound and actorJson.get('summary'):
|
||||
bioFound = actorJson['summary']
|
||||
|
@ -723,11 +730,11 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
|
|||
gender = 'They/Them'
|
||||
bioFoundOrig = bioFound
|
||||
bioFound = bioFound.lower()
|
||||
if translate['He/Him'] in bioFound or \
|
||||
translate['boy'] in bioFound:
|
||||
if translate['He/Him'].lower() in bioFound or \
|
||||
translate['boy'].lower() in bioFound:
|
||||
gender = 'He/Him'
|
||||
elif (translate['She/Her'] in bioFound or
|
||||
translate['girl'] in bioFound):
|
||||
elif (translate['She/Her'].lower() in bioFound or
|
||||
translate['girl'].lower() in bioFound):
|
||||
gender = 'She/Her'
|
||||
elif 'him' in bioFound or 'male' in bioFound:
|
||||
gender = 'He/Him'
|
||||
|
|
Loading…
Reference in New Issue