PHRAS-3425_fix-translation-dump_MASTER

fix : bump patched jms/translation-bundle (forked)
fix : all errors ; most warnings
This commit is contained in:
jygaulier
2021-04-21 15:02:39 +02:00
parent 9beca04cc7
commit fff3f284bb
14 changed files with 84 additions and 65 deletions

View File

@@ -11,13 +11,14 @@
namespace Alchemy\Phrasea\Controller\Admin;
use Alchemy\Phrasea\Controller\Controller;
use Alchemy\Phrasea\SearchEngine\Elastic\ElasticsearchSettingsFormType;
use Alchemy\Phrasea\SearchEngine\Elastic\ElasticsearchOptions;
use Alchemy\Phrasea\SearchEngine\Elastic\ElasticsearchSettingsFormType;
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\GlobalStructure;
use databox_descriptionStructure;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use databox_descriptionStructure;
use Symfony\Component\Translation\TranslatorInterface;
class SearchEngineController extends Controller
{
@@ -112,7 +113,7 @@ class SearchEngineController extends Controller
/** @var GlobalStructure $g */
$g = $this->app['search_engine.global_structure'];
return $this->app->form(new ElasticsearchSettingsFormType($g, $options), $options, [
return $this->app->form(new ElasticsearchSettingsFormType($g, $options, $this->getTranslator()), $options, [
'action' => $this->app->url('admin_searchengine_form'),
]);
}
@@ -140,4 +141,12 @@ class SearchEngineController extends Controller
'response' => $indexer->getSettings(['index' => $index])
]);
}
/**
* @return TranslatorInterface
*/
private function getTranslator()
{
return $this->app['translator'];
}
}