works multiline now
This commit is contained in:
parent
70c273e313
commit
1ef41a3d6d
@ -64,11 +64,9 @@ def main(argc, argv):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]);
|
fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
if len(text) == 1:
|
for i in range(len(text)):
|
||||||
text = text[0];
|
text[i] = translator.translate(text[i], src=src, dest=dest);
|
||||||
translated = translator.translate(text, src=src, dest=dest);
|
for translation in text:
|
||||||
if not(type(translated) is list): translated = [ translated ];
|
|
||||||
for translation in translated:
|
|
||||||
if isatty:
|
if isatty:
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"%s -> %s\n"
|
"%s -> %s\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user