Dont translate entity names in choice widgets.

This commit is contained in:
Jan Böhmer 2020-03-28 17:25:36 +01:00
parent 70c1fb7cc4
commit 4459ea6bca
4 changed files with 4 additions and 0 deletions

View file

@ -67,6 +67,7 @@ class CurrencyEntityType extends StructuralEntityType
$resolver->setDefault('class', Currency::class);
$resolver->setDefault('disable_not_selectable', true);
$resolver->setDefault('choice_translation_domain', false);
// This options allows you to override the currency shown for the null value
$resolver->setDefault('base_currency', null);

View file

@ -60,6 +60,7 @@ class MasterPictureAttachmentType extends AbstractType
$resolver->setDefaults([
'filter' => 'picture',
'choice_translation_domain' => false,
'attr' => [
'class' => 'selectpicker',
],

View file

@ -145,6 +145,7 @@ final class SIUnitType extends AbstractType implements DataMapperInterface
'm' => -3,
'µ' => -6,
],
'choice_translation_domain' => false,
]);
}

View file

@ -108,6 +108,7 @@ class StructuralEntityType extends AbstractType
'choice_attr' => function ($choice, $key, $value) {
return $this->generateChoiceAttr($choice, $key, $value);
},
'choice_translation_domain' => false, //Don't translate the entity names
]);
$resolver->setDefault('empty_message', null);