soimort / translate-shell

:speech_balloon: Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc.
https://www.soimort.org/translate-shell
The Unlicense
6.85k stars 388 forks source link

In Shell mode, cannot reset input language to "Detect Automatically" #451

Closed Ao1Pointblank closed 1 year ago

Ao1Pointblank commented 2 years ago

using the shell option with trans -shell -brief, i cannot revert back to detecting languages automatically once i select 1 input language manually.

example (translating a dutch word):

nl: aardappel
potato

✅ correct translation

then if i want to translate another word from an unknown language, i would have to restart the shell completely or else it would incorrectly keep trying to translate only from NL:

:en 土豆
土豆

❌ can't translate; is still trying to use dutch as input instead of detecting chinese

soimort commented 1 year ago

Thanks for reporting the issue.

I've added a workaround for this. Now it should be possible to use the following command to explicitly set the source language back to auto:

:set sl auto