Skip to content

Commit 2ab2d7b

Browse files
use choice_translation_domain = false for choice types with translated choices
1 parent 6f988b9 commit 2ab2d7b

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

src/Form/Admin/Advert/AdvertFormType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
8585
t('HTML code') => Advert::TYPE_CODE,
8686
t('Image with link') => Advert::TYPE_IMAGE,
8787
],
88+
'choice_translation_domain' => false,
8889
'expanded' => true,
8990
'multiple' => false,
9091
'constraints' => [

src/Form/Admin/Article/ArticleFormType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
106106
t('Site') => Article::TYPE_SITE,
107107
t('Link') => Article::TYPE_LINK,
108108
],
109+
'choice_translation_domain' => false,
109110
'expanded' => true,
110111
'multiple' => false,
111112
'label' => t('Type'),

src/Form/Admin/Customer/RoleGroup/CustomerUserRoleGroupFormType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
4747
'multiple' => true,
4848
'expanded' => true,
4949
'choices' => $this->customerUserRole->getAvailableRoles(),
50+
'choice_translation_domain' => false,
5051
]);
5152

5253
$builder->add('save', SubmitType::class);

src/Form/Admin/PromoCode/PromoCodeFlagType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
4848
t('Products with this flag') => PromoCodeFlag::TYPE_INCLUSIVE,
4949
t('Products without this flag') => PromoCodeFlag::TYPE_EXCLUSIVE,
5050
],
51+
'choice_translation_domain' => false,
5152
'expanded' => true,
5253
'multiple' => false,
5354
'constraints' => [

src/Form/Admin/PromoCode/PromoCodeFormType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ private function buildBaseGroup(FormBuilderInterface $builder): void
113113
'expanded' => true,
114114
'multiple' => false,
115115
'choices' => $this->promoCodeTypeEnum->getAllIndexedByTranslations(),
116+
'choice_translation_domain' => false,
116117
'label' => t('Discount type'),
117118
'attr' => [
118119
'class' => 'js-promo-code-discount-type',

src/Form/RolesType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function configureOptions(OptionsResolver $resolver): void
4141
'expanded' => true,
4242
'label' => false,
4343
'choices' => $this->rolesChoices,
44+
'choice_translation_domain' => false,
4445
]);
4546
}
4647

0 commit comments

Comments
 (0)