1
0

works multiline now

This commit is contained in:
dtb 2022-01-06 08:20:54 -05:00
parent 70c273e313
commit 1ef41a3d6d

View File

@ -64,11 +64,9 @@ def main(argc, argv):
except KeyboardInterrupt:
fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]);
exit(1);
if len(text) == 1:
text = text[0];
translated = translator.translate(text, src=src, dest=dest);
if not(type(translated) is list): translated = [ translated ];
for translation in translated:
for i in range(len(text)):
text[i] = translator.translate(text[i], src=src, dest=dest);
for translation in text:
if isatty:
fprintf(stdout,
"%s -> %s\n"