don't translate empty string

This commit is contained in:
Antonio J. Delgado 2025-02-17 10:26:11 +02:00
parent 6e4283ad26
commit b49ed95f05

View file

@ -271,6 +271,8 @@ class MastodonEmailBridge:
return result return result
def _translate(self, text, source_language='auto', destination_language=None): def _translate(self, text, source_language='auto', destination_language=None):
if text == '':
return ''
if destination_language is None: if destination_language is None:
destination_language = self.config['destination_language'] destination_language = self.config['destination_language']
data = { data = {