Closed jilulu closed 3 years ago
Trying to translate any scentence that includes a single quote ' will cause DeepL to throw a Parse error.
'
./deepl.sh -l JA "How's" {"items": [{"uid": null,"arg": "Error: Parse error","valid": "yes","autocomplete": "autocomplete","title": "Error: Parse error"}]}
This line https://github.com/AlexanderWillner/deepl-alfred-workflow2/blob/master/deepl.sh#L62 escapses single quotes and replaces it with \'. That seems to be causing a confusion to DeepL.
\'
./deepl.sh -l JA "How's." { "items": [ { "uid": null, "arg": "どうですか?", "valid": "yes", "autocomplete": "autocomplete", "title": "どうですか?" }, { "uid": null, "arg": "どうだ?", "valid": "yes", "autocomplete": "autocomplete", "title": "どうだ?" }, { "uid": null, "arg": "どうなんですか?", "valid": "yes", "autocomplete": "autocomplete", "title": "どうなんですか?" }, { "uid": null, "arg": "どうなの?", "valid": "yes", "autocomplete": "autocomplete", "title": "どうなの?" } ] }
Thanks! Adopted it in 5163aef
Issue
Trying to translate any scentence that includes a single quote
'
will cause DeepL to throw a Parse error.Reproducing the issue
Possible cause of this issue
This line https://github.com/AlexanderWillner/deepl-alfred-workflow2/blob/master/deepl.sh#L62 escapses single quotes and replaces it with
\'
. That seems to be causing a confusion to DeepL.After the fix