diff --git a/translations/ar.json b/translations/ar.json index 9464a5fd8..35b5ab3c3 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -386,5 +386,6 @@ "He/Him": "هو", "She/Her": "هي", "girl": "فتاة", - "boy": "صبي" + "boy": "صبي", + "pronoun": "ضمير" } diff --git a/translations/ca.json b/translations/ca.json index 270c58bf3..52dde7634 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -386,5 +386,6 @@ "He/Him": "Ell", "She/Her": "Ella", "girl": "noia", - "boy": "noi" + "boy": "noi", + "pronoun": "pronom" } diff --git a/translations/cy.json b/translations/cy.json index 50eb775b7..54dd36563 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -386,5 +386,6 @@ "He/Him": "Ef", "She/Her": "Hi/Ei", "girl": "merch", - "boy": "bachgen" + "boy": "bachgen", + "pronoun": "rhagenw" } diff --git a/translations/de.json b/translations/de.json index daac52394..91cbcf5d2 100644 --- a/translations/de.json +++ b/translations/de.json @@ -386,5 +386,6 @@ "He/Him": "Er/ihm", "She/Her": "Sie", "girl": "mädchen", - "boy": "junge" + "boy": "junge", + "pronoun": "pronomen" } diff --git a/translations/en.json b/translations/en.json index f8bd99cc8..e4c98b58a 100644 --- a/translations/en.json +++ b/translations/en.json @@ -386,5 +386,6 @@ "He/Him": "He/Him", "She/Her": "She/Her", "girl": "girl", - "boy": "boy" + "boy": "boy", + "pronoun": "pronoun" } diff --git a/translations/es.json b/translations/es.json index acf4db559..e03be97ab 100644 --- a/translations/es.json +++ b/translations/es.json @@ -386,5 +386,6 @@ "He/Him": "El", "She/Her": "Ella", "girl": "muchacha", - "boy": "niño" + "boy": "niño", + "pronoun": "pronombre" } diff --git a/translations/fr.json b/translations/fr.json index e59a9a2e6..91e3c6691 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -386,5 +386,6 @@ "He/Him": "Il/Lui", "She/Her": "Elle", "girl": "fille", - "boy": "garçon" + "boy": "garçon", + "pronoun": "pronom" } diff --git a/translations/ga.json b/translations/ga.json index 2552a172b..a50b84c60 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -386,5 +386,6 @@ "He/Him": "Sé/Eisean", "She/Her": "Sí", "girl": "cailín", - "boy": "buachaill" + "boy": "buachaill", + "pronoun": "forainm" } diff --git a/translations/hi.json b/translations/hi.json index 59ed7f0bf..e47922125 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -386,5 +386,6 @@ "He/Him": "वह/उसे", "She/Her": "वह/उसकी", "girl": "लड़की", - "boy": "लड़का" + "boy": "लड़का", + "pronoun": "सवर्नाम" } diff --git a/translations/it.json b/translations/it.json index 72f3a93f1..bae879d33 100644 --- a/translations/it.json +++ b/translations/it.json @@ -386,5 +386,6 @@ "He/Him": "Lui", "She/Her": "Lei", "girl": "ragazza", - "boy": "ragazzo" + "boy": "ragazzo", + "pronoun": "pronome" } diff --git a/translations/ja.json b/translations/ja.json index 069ba9093..441a5fa7d 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -386,5 +386,6 @@ "He/Him": "彼", "She/Her": "彼女", "girl": "女の子", - "boy": "男の子" + "boy": "男の子", + "pronoun": "代名詞" } diff --git a/translations/oc.json b/translations/oc.json index 4f5f577a1..bf8bac91f 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -382,5 +382,6 @@ "He/Him": "He/Him", "She/Her": "She/Her", "girl": "girl", - "boy": "boy" + "boy": "boy", + "pronoun": "pronoun" } diff --git a/translations/pt.json b/translations/pt.json index 516d3b6ca..b5a5ff75f 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -386,5 +386,6 @@ "He/Him": "Ele", "She/Her": "Ela", "girl": "garota", - "boy": "garoto" + "boy": "garoto", + "pronoun": "pronome" } diff --git a/translations/ru.json b/translations/ru.json index c7c82a6d4..d90360b34 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -386,5 +386,6 @@ "He/Him": "Он/Его", "She/Her": "Она/Ее", "girl": "девочка", - "boy": "мальчик" + "boy": "мальчик", + "pronoun": "местоимение" } diff --git a/translations/zh.json b/translations/zh.json index 2cf1aa4ed..8b88da848 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -386,5 +386,6 @@ "He/Him": "他", "She/Her": "她", "girl": "女孩", - "boy": "男生" + "boy": "男生", + "pronoun": "代词" } diff --git a/utils.py b/utils.py index 00b77fab4..1a25e96c0 100644 --- a/utils.py +++ b/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'