add a test script
This commit is contained in:
parent
3db704a28c
commit
9163113291
2 changed files with 34 additions and 2 deletions
|
|
@ -39,8 +39,8 @@ class GoogleTranslateBackend(BaseBackend, ICapTranslate):
|
|||
|
||||
def translate(self, lan_from, lan_to, text):
|
||||
translation = Translation(0)
|
||||
translation.lang_src = lan_from
|
||||
translation.lang_dst = lan_to
|
||||
translation.lang_src = unicode(lan_from)
|
||||
translation.lang_dst = unicode(lan_to)
|
||||
translation.text = self.browser.translate(lan_from, lan_to, text)
|
||||
|
||||
if translation.text is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue