commit/instantTranslate: ABuffEr: Minimum fix in replacing newlines

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Sat, 11 Apr 2015 17:26:29 -0000

1 new commit in instantTranslate:

https://bitbucket.org/nvdaaddonteam/instanttranslate/commits/8041e5236c3a/
Changeset: 8041e5236c3a
Branch: POSTImplementation
User: ABuffEr
Date: 2015-04-11 17:26:19+00:00
Summary: Minimum fix in replacing newlines

Affected #: 1 file

diff --git a/addon/globalPlugins/instantTranslate/translator.py
b/addon/globalPlugins/instantTranslate/translator.py
index e904999..bfef5ae 100644
--- a/addon/globalPlugins/instantTranslate/translator.py
+++ b/addon/globalPlugins/instantTranslate/translator.py
@@ -79,7 +79,7 @@ class Translator(threading.Thread):
raise e
self.translation += translation
# some adjustment, better to do on full text
- self.translation = self.translation.replace('\r\n ',
'\r\n').replace(' ', ' ')[1:]
+ self.translation = self.translation.replace('\r\n ',
'\n').replace('\n ', '\r\n').replace(' ', ' ')[1:]
self.lang_translated = lang_translated

def buildRequest(self, text, lang_from, lang_to):

Repository URL: https://bitbucket.org/nvdaaddonteam/instanttranslate/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts:

  • » commit/instantTranslate: ABuffEr: Minimum fix in replacing newlines - commits-noreply