diff --git a/lib/i18n/tasks/translators/deepl_translator.rb b/lib/i18n/tasks/translators/deepl_translator.rb index 7bfd3c5f..5dfedc9e 100644 --- a/lib/i18n/tasks/translators/deepl_translator.rb +++ b/lib/i18n/tasks/translators/deepl_translator.rb @@ -17,9 +17,9 @@ def initialize(*) protected def translate_values(list, from:, to:, **options) - result = DeepL.translate(list, to_deepl_compatible_locale(from), to_deepl_compatible_locale(to), options).map(&:text) + result = DeepL.translate(list, to_deepl_compatible_locale(from), to_deepl_compatible_locale(to), options) if result.is_a?(DeepL::Resources::Text) - result.text + [result.text] else result.map(&:text) end