mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Babelize wasn't properly setting the language when it terminated early
This commit is contained in:
parent
5633b9d46b
commit
32f39e0980
@ -143,6 +143,7 @@ def babelize(phrase, from_language, through_language, limit = 12, callback = Non
|
||||
for i in range(limit):
|
||||
phrase = translate(phrase, next, flip[next])
|
||||
if seen.has_key(phrase):
|
||||
next = flip[next]
|
||||
break
|
||||
seen[phrase] = 1
|
||||
if callback:
|
||||
|
@ -45,6 +45,7 @@ if network:
|
||||
def testBabelize(self):
|
||||
self.assertNotError('babelize en sp foo')
|
||||
self.assertError('babelize sp fr foo')
|
||||
self.assertResponse('babelize german english sprache', 'language')
|
||||
|
||||
def testRandomlanguage(self):
|
||||
self.assertNotError('randomlanguage')
|
||||
|
Loading…
Reference in New Issue
Block a user