Closed VincentLanglet closed 1 year ago
Thanks for this! I agree the behaviour is inconsistent, e.g. in deepl-python
translating ''
raises an error but translating ['']
works fine. I'm checking internally why we don't allow empty string and how we want to handle this, let me get back to you.
Agreed that we should allow translating empty string. I'll merge this
Hi @JanEbbing
Currently an exception is thrown when we try to translate an empty string. This seems to be an unnecessary check because if I remove the check manually in my vendors, the API works fine.
When receiving multiple users inputs and if we want to translate for instance
This seems unnecessary to ask us to
''
value[0 => 'foo', 1 => 'bar', 3 => 'baz']
(while the API call lose the initial keys)While an API call with
['foo', 'bar', '', 'baz']
seems to works fine if the input validation is removed.