Only offer translation for supported languages (#23879)

This commit is contained in:
Christian Schmidt
2023-03-03 21:06:31 +01:00
committed by GitHub
parent 0872f3e3d7
commit 5a8c651e8f
13 changed files with 336 additions and 31 deletions

View File

@@ -21,6 +21,10 @@ class TranslationService
ENV['DEEPL_API_KEY'].present? || ENV['LIBRE_TRANSLATE_ENDPOINT'].present?
end
def supported?(_source_language, _target_language)
false
end
def translate(_text, _source_language, _target_language)
raise NotImplementedError
end