Skip to content

Commit

Permalink
Update deepl_translator.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbischof authored and glebm committed Dec 21, 2020
1 parent 0a52676 commit e8b3cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/i18n/tasks/translators/deepl_translator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8b3cc6

Please sign in to comment.