mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-27 05:21:10 -05:00
TranslateParty: strip formatting before translating, not after...
Really fixes #60.
This commit is contained in:
parent
afabf73705
commit
ddc92142a2
@ -196,13 +196,13 @@ class TranslateParty(callbacks.Plugin):
|
|||||||
self.log.debug(format("TranslateParty: Using %i languages: %L "
|
self.log.debug(format("TranslateParty: Using %i languages: %L "
|
||||||
"(outlang %s)", len(ll), ll, outlang))
|
"(outlang %s)", len(ll), ll, outlang))
|
||||||
|
|
||||||
|
text = ircutils.stripFormatting(text)
|
||||||
# For every language in this list, translate the text given from
|
# For every language in this list, translate the text given from
|
||||||
# auto-detect into the target language, and replace the original text
|
# auto-detect into the target language, and replace the original text
|
||||||
# with it.
|
# with it.
|
||||||
for targetlang in ll:
|
for targetlang in ll:
|
||||||
text = self.getTranslation(irc, "auto", targetlang, text)
|
text = self.getTranslation(irc, "auto", targetlang, text)
|
||||||
text = self.getTranslation(irc, "auto", outlang, text)
|
text = self.getTranslation(irc, "auto", outlang, text)
|
||||||
text = ircutils.stripFormatting(text)
|
|
||||||
text = text.strip()
|
text = text.strip()
|
||||||
|
|
||||||
if self.registryValue("verbose", msg.args[0]):
|
if self.registryValue("verbose", msg.args[0]):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user