1
0
This commit is contained in:
dtb 2022-01-06 22:50:07 -05:00
parent c36667cf57
commit e3e92a2884

View File

@ -36,7 +36,7 @@ def usage(name):
def main(argc, argv): def main(argc, argv):
accepted_languages = set(list(googletrans.LANGCODES) accepted_languages = set(list(googletrans.LANGCODES)
+ list(googletrans.LANGUAGES)); + list(googletrans.LANGUAGES) + [ "auto" ]);
good = True; good = True;
isatty = stdout.isatty(); isatty = stdout.isatty();
translator = googletrans.Translator(); translator = googletrans.Translator();
@ -79,7 +79,7 @@ def main(argc, argv):
translation.pronunciation translation.pronunciation
); );
else: else:
printf(stdout, "%s\n", translation.text); fprintf(stdout, "%s\n", translation.text);
return 0; return 0;
exit(main(len(sys.argv), sys.argv)); exit(main(len(sys.argv), sys.argv));