From c6ea46b702410e688ee36ac4ff6a9080c4e4b286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 9 Nov 2025 17:08:07 +0100 Subject: [PATCH] Use default translations for the NotBlank constraint --- src/Form/Type/DataSourceSynonymRowType.php | 12 ++++-------- translations/validators.cs.xlf | 6 ------ translations/validators.de.xlf | 6 ------ translations/validators.en.xlf | 6 ------ 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/Form/Type/DataSourceSynonymRowType.php b/src/Form/Type/DataSourceSynonymRowType.php index 58970ce7..2c6dcdbf 100644 --- a/src/Form/Type/DataSourceSynonymRowType.php +++ b/src/Form/Type/DataSourceSynonymRowType.php @@ -52,7 +52,7 @@ class DataSourceSynonymRowType extends AbstractType 'choices' => $this->buildDataSourceChoices($options['data_sources']), 'required' => true, 'constraints' => [ - new Assert\NotBlank(message: 'settings.system.data_source_synonyms.row_type.value_not_blank'), + new Assert\NotBlank(), ], ]) ->add('locale', LocaleType::class, [ @@ -63,7 +63,7 @@ class DataSourceSynonymRowType extends AbstractType 'choices' => $this->buildLocaleChoices(true), 'preferred_choices' => $this->getPreferredLocales(), 'constraints' => [ - new Assert\NotBlank(message: 'settings.system.data_source_synonyms.row_type.value_not_blank'), + new Assert\NotBlank(), ], ]) ->add('translation_singular', TextType::class, [ @@ -71,7 +71,7 @@ class DataSourceSynonymRowType extends AbstractType 'required' => true, 'empty_data' => '', 'constraints' => [ - new Assert\NotBlank(message: 'settings.system.data_source_synonyms.row_type.value_not_blank'), + new Assert\NotBlank(), ], ]) ->add('translation_plural', TextType::class, [ @@ -79,7 +79,7 @@ class DataSourceSynonymRowType extends AbstractType 'required' => true, 'empty_data' => '', 'constraints' => [ - new Assert\NotBlank(message: 'settings.system.data_source_synonyms.row_type.value_not_blank'), + new Assert\NotBlank(), ], ]); } @@ -133,9 +133,5 @@ class DataSourceSynonymRowType extends AbstractType { $resolver->setRequired('data_sources'); $resolver->setAllowedTypes('data_sources', 'array'); - - $resolver->setDefaults([ - 'error_translation_domain' => 'validators', - ]); } } diff --git a/translations/validators.cs.xlf b/translations/validators.cs.xlf index 5f1f9a54..4c1f396d 100644 --- a/translations/validators.cs.xlf +++ b/translations/validators.cs.xlf @@ -365,12 +365,6 @@ Neplatný kód. Zkontrolujte, zda je vaše ověřovací aplikace správně nastavena a zda je čas správně nastaven jak na serveru, tak na ověřovacím zařízení. - - - settings.system.data_source_synonyms.row_type.value_not_blank - Tato hodnota nemůže být prázdná. - - settings.system.data_source_synonyms.collection_type.duplicate diff --git a/translations/validators.de.xlf b/translations/validators.de.xlf index 5d226d6a..3d125c9a 100644 --- a/translations/validators.de.xlf +++ b/translations/validators.de.xlf @@ -365,12 +365,6 @@ Ungültiger Code. Überprüfen Sie, ob die Authenticator App korrekt eingerichtet ist und ob der Server und das Gerät beide die korrekte Uhrzeit eingestellt haben. - - - settings.system.data_source_synonyms.row_type.value_not_blank - Dieser Wert darf nicht leer sein. - - settings.system.data_source_synonyms.collection_type.duplicate diff --git a/translations/validators.en.xlf b/translations/validators.en.xlf index e0f4be15..c679dac6 100644 --- a/translations/validators.en.xlf +++ b/translations/validators.en.xlf @@ -365,12 +365,6 @@ Invalid code. Check that your authenticator app is set up correctly and that both the server and authentication device has the time set correctly. - - - settings.system.data_source_synonyms.row_type.value_not_blank - This value should not be blank. - - settings.system.data_source_synonyms.collection_type.duplicate