Merge branch 'master' into retrygrab

This commit is contained in:
Chrys 2019-10-22 00:28:17 +02:00
commit aa5bb94237
7 changed files with 158 additions and 57 deletions

View File

@ -44,10 +44,29 @@ _:===:Lienie unten
=:===:Istgleich
[customDict]
[emoticonDict]
:):===:Grins
;):===:Zwinker
XD:===:loool
:D:===:Lach
<{-.-}>:===:Raves
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -44,26 +44,31 @@ _:===:line
=:===:equals
[customDict]
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[emoticonDict]
<{-.-}>:===:Raves
8-):===:smile with sunglasses
:-/:===:confused
-.-:===:bugged
>.<:===:laughing
8-X:===:skull
>:):===:evil smile
>:-):===:evil smile
\o/:===:Hurray
:/:===:confused
8):===:smile with sunglasses
:D:===:laugh
;):===:wink
XD:===:LOL
:-):===:smile
:):===:smile
->:===:arrow right
<-:===:arrow left
oO:===:WTF?
Oo:===:WTF?
^^:===:enjoy smile
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -44,10 +44,29 @@ _:===:line
=:===:equals
[customDict]
[emoticonDict]
:):===:smile
;):===:twinker
XD:===:loool
:D:===:lought
<{-.-}>:===:Raves
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -44,10 +44,29 @@ _:===:subrayado
=:===:igual
[customDict]
[emoticonDict]
:):===:sonrisa
;):===:twinker
XD:===:loool
:D:===:lought
<{-.-}>:===:Raves
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -44,10 +44,29 @@ _:===:souligné
=:===:égale à
[customDict]
[emoticonDict]
:):===:sourire
;):===:clin d'oeil
XD:===:explosé de rire
:D:===:rire
<{-.-}>:===:Raves
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -44,10 +44,29 @@ _:===:podkreślnik
=:===:równa się
[customDict]
[emoticonDict]
:):===:smile
;):===:twinker
XD:===:loool
:D:===:lought
<{-.-}>:===:Raves
# This dictionary uses regexp, so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
[\s*|'|"][\s*|'|"]:-/:===:confused
[\s*|'|"][\s*|'|"]-\.-:===:bugged
[\s*|'|"][\s*|'|"]>\.<:===:laughing
[\s*|'|"][\s*|'|"]8-X:===:skull
[\s*|'|"][\s*|'|"]>:\):===:evil smile
[\s*|'|"][\s*|'|"]>:-\):===:evil smile
[\s*|'|"][\s*|'|"]\\o/:===:Hurray
[\s*|'|"][\s*|'|"]:/:===:confused
[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
[\s*|'|"]:D[\s*|'|"]:===:laugh
[\s*|'|"];\)[\s*|'|"]:===:wink
[\s*|'|"]XD[\s*|'|"]:===:LOL
[\s*|'|"]:-\)[\s*|'|"]:===:smile
[\s*|'|"]:\)[\s*|'|"]:===:smile
[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
[\s*|'|"]<-[\s*|'|"]:===:arrow left
[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile

View File

@ -34,14 +34,15 @@ class punctuationManager():
except:
pass
return text.translate(currAllPunctNone)
def useCustomDict(self, text, customDict, seperator=''):
resultText = str(text)
if customDict:
for key,item in customDict.items():
resultText = resultText.replace(str(key),seperator + str(item) + seperator)
try:
resultText = re.sub(str(key), seperator + str(item) + seperator, resultText)
except:
resultText = resultText.replace(str(key),seperator + str(item) + seperator)
return resultText
def usePunctuationDict(self, text, punctuationDict, punctuation):
resultText = str(text)
@ -49,7 +50,7 @@ class punctuationManager():
if ' ' in punctuation:
resultText = resultText.replace(' ',' ' + punctuationDict[' '] + ' ')
for key,item in punctuationDict.items():
if key in punctuation and key not in ' ':
if (punctuation != '' and key in punctuation) and key not in ' ':
if self.env['runtime']['settingsManager'].getSetting('general', 'respectPunctuationPause') and \
len(key) == 1 and \
key in "',.;:?!":