Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon into main

main
Bob Mottram 2021-03-03 14:32:07 +00:00
commit 3b1bc04968
16 changed files with 71 additions and 17 deletions

View File

@ -384,5 +384,8 @@
"laughing": "يضحك", "laughing": "يضحك",
"gender": "جنس تذكير أو تأنيث", "gender": "جنس تذكير أو تأنيث",
"He/Him": "هو", "He/Him": "هو",
"She/Her": "هي" "She/Her": "هي",
"girl": "فتاة",
"boy": "صبي",
"pronoun": "ضمير"
} }

View File

@ -384,5 +384,8 @@
"laughing": "rient", "laughing": "rient",
"gender": "gènere", "gender": "gènere",
"He/Him": "Ell", "He/Him": "Ell",
"She/Her": "Ella" "She/Her": "Ella",
"girl": "noia",
"boy": "noi",
"pronoun": "pronom"
} }

View File

@ -384,5 +384,8 @@
"laughing": "chwerthin", "laughing": "chwerthin",
"gender": "rhyw", "gender": "rhyw",
"He/Him": "Ef", "He/Him": "Ef",
"She/Her": "Hi/Ei" "She/Her": "Hi/Ei",
"girl": "merch",
"boy": "bachgen",
"pronoun": "rhagenw"
} }

View File

@ -384,5 +384,8 @@
"laughing": "Lachen", "laughing": "Lachen",
"gender": "geschlecht", "gender": "geschlecht",
"He/Him": "Er/ihm", "He/Him": "Er/ihm",
"She/Her": "Sie" "She/Her": "Sie",
"girl": "mädchen",
"boy": "junge",
"pronoun": "pronomen"
} }

View File

@ -384,5 +384,8 @@
"laughing": "laughing", "laughing": "laughing",
"gender": "gender", "gender": "gender",
"He/Him": "He/Him", "He/Him": "He/Him",
"She/Her": "She/Her" "She/Her": "She/Her",
"girl": "girl",
"boy": "boy",
"pronoun": "pronoun"
} }

View File

@ -384,5 +384,8 @@
"laughing": "risa", "laughing": "risa",
"gender": "género", "gender": "género",
"He/Him": "El", "He/Him": "El",
"She/Her": "Ella" "She/Her": "Ella",
"girl": "muchacha",
"boy": "niño",
"pronoun": "pronombre"
} }

View File

@ -384,5 +384,8 @@
"laughing": "en riant", "laughing": "en riant",
"gender": "le genre", "gender": "le genre",
"He/Him": "Il/Lui", "He/Him": "Il/Lui",
"She/Her": "Elle" "She/Her": "Elle",
"girl": "fille",
"boy": "garçon",
"pronoun": "pronom"
} }

View File

@ -384,5 +384,8 @@
"laughing": "ag gáire", "laughing": "ag gáire",
"gender": "inscne", "gender": "inscne",
"He/Him": "Sé/Eisean", "He/Him": "Sé/Eisean",
"She/Her": "Sí" "She/Her": "Sí",
"girl": "cailín",
"boy": "buachaill",
"pronoun": "forainm"
} }

View File

@ -384,5 +384,8 @@
"laughing": "हस रहा", "laughing": "हस रहा",
"gender": "लिंग", "gender": "लिंग",
"He/Him": "वह/उसे", "He/Him": "वह/उसे",
"She/Her": "वह/उसकी" "She/Her": "वह/उसकी",
"girl": "लड़की",
"boy": "लड़का",
"pronoun": "सवर्नाम"
} }

View File

@ -384,5 +384,8 @@
"laughing": "ridendo", "laughing": "ridendo",
"gender": "genere", "gender": "genere",
"He/Him": "Lui", "He/Him": "Lui",
"She/Her": "Lei" "She/Her": "Lei",
"girl": "ragazza",
"boy": "ragazzo",
"pronoun": "pronome"
} }

View File

@ -384,5 +384,8 @@
"laughing": "笑い", "laughing": "笑い",
"gender": "性別", "gender": "性別",
"He/Him": "彼", "He/Him": "彼",
"She/Her": "彼女" "She/Her": "彼女",
"girl": "女の子",
"boy": "男の子",
"pronoun": "代名詞"
} }

View File

@ -380,5 +380,8 @@
"laughing": "laughing", "laughing": "laughing",
"gender": "gender", "gender": "gender",
"He/Him": "He/Him", "He/Him": "He/Him",
"She/Her": "She/Her" "She/Her": "She/Her",
"girl": "girl",
"boy": "boy",
"pronoun": "pronoun"
} }

View File

@ -384,5 +384,8 @@
"laughing": "rindo", "laughing": "rindo",
"gender": "gênero", "gender": "gênero",
"He/Him": "Ele", "He/Him": "Ele",
"She/Her": "Ela" "She/Her": "Ela",
"girl": "garota",
"boy": "garoto",
"pronoun": "pronome"
} }

View File

@ -384,5 +384,8 @@
"laughing": "смеющийся", "laughing": "смеющийся",
"gender": "Пол", "gender": "Пол",
"He/Him": "Он/Его", "He/Him": "Он/Его",
"She/Her": "Она/Ее" "She/Her": "Она/Ее",
"girl": "девочка",
"boy": "мальчик",
"pronoun": "местоимение"
} }

View File

@ -384,5 +384,8 @@
"laughing": "笑", "laughing": "笑",
"gender": "性别", "gender": "性别",
"He/Him": "他", "He/Him": "他",
"She/Her": "她" "She/Her": "她",
"girl": "女孩",
"boy": "男生",
"pronoun": "代词"
} }

View File

@ -678,6 +678,7 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
if not personCache.get(actor): if not personCache.get(actor):
return None return None
bioFound = None bioFound = None
pronounStr = translate['pronoun'].lower()
if personCache[actor].get('actor'): if personCache[actor].get('actor'):
# is gender defined as a profile tag? # is gender defined as a profile tag?
if personCache[actor]['actor'].get('attachment'): if personCache[actor]['actor'].get('attachment'):
@ -692,6 +693,9 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
translate['gender'].lower(): translate['gender'].lower():
bioFound = tag['value'] bioFound = tag['value']
break break
elif tag['name'].lower().startswith(pronounStr):
bioFound = tag['value']
break
# if not then use the bio # if not then use the bio
if not bioFound and personCache[actor]['actor'].get('summary'): if not bioFound and personCache[actor]['actor'].get('summary'):
bioFound = personCache[actor]['actor']['summary'] bioFound = personCache[actor]['actor']['summary']
@ -715,6 +719,9 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
translate['gender'].lower(): translate['gender'].lower():
bioFound = tag['value'] bioFound = tag['value']
break break
elif tag['name'].lower().startswith(pronounStr):
bioFound = tag['value']
break
# if not then use the bio # if not then use the bio
if not bioFound and actorJson.get('summary'): if not bioFound and actorJson.get('summary'):
bioFound = actorJson['summary'] bioFound = actorJson['summary']
@ -723,9 +730,11 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {},
gender = 'They/Them' gender = 'They/Them'
bioFoundOrig = bioFound bioFoundOrig = bioFound
bioFound = bioFound.lower() bioFound = bioFound.lower()
if translate['He/Him'] in bioFound: if translate['He/Him'].lower() in bioFound or \
translate['boy'].lower() in bioFound:
gender = 'He/Him' gender = 'He/Him'
elif translate['She/Her'] in bioFound: elif (translate['She/Her'].lower() in bioFound or
translate['girl'].lower() in bioFound):
gender = 'She/Her' gender = 'She/Her'
elif 'him' in bioFound or 'male' in bioFound: elif 'him' in bioFound or 'male' in bioFound:
gender = 'He/Him' gender = 'He/Him'