mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-17 00:19:31 +00:00
Use static message in settings to remove translation editor clutter
This commit is contained in:
parent
5d843ec8eb
commit
e112a8dbe0
2 changed files with 6 additions and 2 deletions
|
|
@ -31,6 +31,7 @@ use Symfony\Component\Form\Extension\Core\Type\LocaleType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Intl\Locales;
|
||||
use Symfony\Component\Translation\StaticMessage;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
|
|
@ -67,7 +68,9 @@ class TypeSynonymRowType extends AbstractType
|
|||
new Assert\NotBlank(),
|
||||
],
|
||||
'choice_label' => function (ElementTypes $choice) {
|
||||
return $this->translator->trans($choice->getDefaultLabelKey()) . ' (' . $this->translator->trans($choice->getDefaultPluralLabelKey()) . ')';
|
||||
return new StaticMessage(
|
||||
$this->translator->trans($choice->getDefaultLabelKey()) . ' (' . $this->translator->trans($choice->getDefaultPluralLabelKey()) . ')'
|
||||
);
|
||||
},
|
||||
'row_attr' => ['class' => 'mb-0'],
|
||||
'attr' => ['class' => 'form-select-sm'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue