mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Fix unit tests
							parent
							
								
									50ec0f6ce2
								
							
						
					
					
						commit
						76314d55b6
					
				|  | @ -68,6 +68,8 @@ def _speakerPronounce(baseDir: str, sayText: str, translate: {}) -> str: | |||
|     Epicyon -> Epi-cyon | ||||
|     """ | ||||
|     pronounceFilename = baseDir + '/accounts/speaker_pronounce.txt' | ||||
|     convertDict = {} | ||||
|     if translate: | ||||
|         convertDict = { | ||||
|             "Epicyon": "Epi-cyon", | ||||
|             "espeak": "e-speak", | ||||
|  | @ -124,7 +126,10 @@ def speakerReplaceLinks(sayText: str, translate: {}, | |||
|         text = text.replace(ch, ' ') | ||||
|     replacements = {} | ||||
|     wordsList = text.split(' ') | ||||
|     if translate.get('Linked'): | ||||
|         linkedStr = translate['Linked'] | ||||
|     else: | ||||
|         linkedStr = 'Linked' | ||||
|     prevWord = '' | ||||
|     for word in wordsList: | ||||
|         if word.startswith(':'): | ||||
|  | @ -133,6 +138,7 @@ def speakerReplaceLinks(sayText: str, translate: {}, | |||
|                 continue | ||||
|         # replace mentions, but not re-tweets | ||||
|         if word.startswith('@') and not prevWord.endswith('RT'): | ||||
|             if translate.get('mentioning'): | ||||
|                 replacements[word] = \ | ||||
|                     translate['mentioning'] + ' ' + word[1:] + ',' | ||||
|         prevWord = word | ||||
|  |  | |||
							
								
								
									
										3
									
								
								utils.py
								
								
								
								
							
							
						
						
									
										3
									
								
								utils.py
								
								
								
								
							|  | @ -678,7 +678,10 @@ def getGenderFromBio(baseDir: str, actor: str, personCache: {}, | |||
|     if not personCache.get(actor): | ||||
|         return None | ||||
|     bioFound = None | ||||
|     if translate: | ||||
|         pronounStr = translate['pronoun'].lower() | ||||
|     else: | ||||
|         pronounStr = 'pronoun' | ||||
|     if personCache[actor].get('actor'): | ||||
|         # is gender defined as a profile tag? | ||||
|         if personCache[actor]['actor'].get('attachment'): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue