about summary refs log tree commit diff
path: root/app/lib/translation_service.rb
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-03-03 21:06:31 +0100
committerGitHub <noreply@github.com>2023-03-03 21:06:31 +0100
commit5a8c651e8f0252c7135042e79396f782361302d9 (patch)
treee3e0a8c7f1410507a5ce311625e185ac5bdddae8 /app/lib/translation_service.rb
parent0872f3e3d743a16533ac4fad4cd83b103047808c (diff)
Only offer translation for supported languages (#23879)
Diffstat (limited to 'app/lib/translation_service.rb')
-rw-r--r--app/lib/translation_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/translation_service.rb b/app/lib/translation_service.rb
index 285f30939..5ff93674a 100644
--- a/app/lib/translation_service.rb
+++ b/app/lib/translation_service.rb
@@ -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