mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 20:54:20 +01:00
Refactor translations to XLIFF format, enhance elimination workflows, and update compose configuration
This commit switches translations from YAML to XLIFF format for better standardization, updates the elimination preparation process with UI and functionality improvements, tweaks form structures, adjusts compose.override.yaml for improved asset handling, and optimizes back office usability with refined translation handling.
This commit is contained in:
30
src/Form/EliminationEnterNameType.php
Normal file
30
src/Form/EliminationEnterNameType.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/** @extends AbstractType<null> */
|
||||
class EliminationEnterNameType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TextType::class,
|
||||
[
|
||||
'required' => true,
|
||||
'label' => $this->translator->trans('Enter name'),
|
||||
'translation_domain' => false,
|
||||
'attr' => ['autofocus' => true],
|
||||
],
|
||||
)
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ class EnterNameType extends AbstractType
|
||||
'required' => true,
|
||||
'label' => $this->translator->trans('Enter your name'),
|
||||
'translation_domain' => false,
|
||||
'attr' => ['autofocus' => true],
|
||||
],
|
||||
)
|
||||
;
|
||||
|
||||
@@ -19,10 +19,13 @@ class SelectSeasonType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('season_code', TextType::class,
|
||||
['required' => true, 'constraints' => new Regex(pattern: "/^[A-Za-z\d]{5}$/"), 'label' => $this->translator->trans('Season Code'), 'translation_domain' => false]
|
||||
)
|
||||
;
|
||||
->add('season_code', TextType::class, [
|
||||
'required' => true,
|
||||
'constraints' => new Regex(pattern: "/^[A-Za-z\d]{5}$/"),
|
||||
'label' => $this->translator->trans('Season Code'),
|
||||
'translation_domain' => false,
|
||||
'attr' => ['autofocus' => true],
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
|
||||
Reference in New Issue
Block a user