fix custom dict

This commit is contained in:
chrys 2016-10-12 22:14:18 +02:00
parent fcf212d715
commit f817c12618
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ punctuation = {
'=':'equals', '=':'equals',
}, },
'CUSTOMDICT':{ 'CUSTOMDICT':{
'chrys': 'king chrys' 'chrys': 'nice chrys'
}, },
'EMOJDICT':{ 'EMOJDICT':{
':)':'smiley', ':)':'smiley',

View File

@ -38,8 +38,9 @@ class punctuationManager():
return resultText return resultText
def proceedPunctuation(self, text, ignorePunctuation=False): def proceedPunctuation(self, text, ignorePunctuation=False):
resultText = self.useCustomDict(text, self.env['punctuation']['CUSTOMDICT']) resultText = text
resultText = self.useCustomDict(text, self.env['punctuation']['EMOJDICT']) resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT'])
resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT'])
currPunctLevel = '' currPunctLevel = ''
if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']:
currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()]