From cf6ffa2bbcb2eba2335dc39cf58fe071537f002f Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 26 Dec 2023 17:24:45 +0100
Subject: [PATCH] working!

---
 app/controllers/admin/translation_controller.rb | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/controllers/admin/translation_controller.rb b/app/controllers/admin/translation_controller.rb
index 3273f11ad..5bd966ace 100644
--- a/app/controllers/admin/translation_controller.rb
+++ b/app/controllers/admin/translation_controller.rb
@@ -1,12 +1,9 @@
 class Admin::TranslationController < Admin::ApplicationController
   def translate
     @target = translation_params[:target]
-    # @response = LibreTranslate.translate  translation_params[:text],
-    #                                       source: translation_params[:from],
-    #                                       target: translation_params[:to]
-    @response = {
-      'translatedText' => 'test'
-    }
+    @response = LibreTranslate.translate  translation_params[:text],
+                                          source: translation_params[:from],
+                                          target: translation_params[:to]
   end
 
   protected
-- 
GitLab