php-translation / symfony-bundle

Symfony integration for Translations
MIT License
327 stars 94 forks source link

Sf4 Form type title attribute not extracted #394

Closed pdias closed 4 years ago

pdias commented 4 years ago

In Symfony 4, form type i have this:

$builder->add(
            'icon',
            IconChoiceType::class,
            [
                'required' => true,
                'label' => 'menu.icon',
                'help' => 'menu.icon.help',
                'label_attr' => ['class' => 'ellipsis'],
                'attr' => [
                    'class' => 'form-control selectpicker show-tick',
                    'title' => 'menu.select.icon.title',
                    'data-size' => '5',
                    'data-width' => '100%',
                    'data-live-search' => 'true',
                    'data-style' => 'btn btn-light btn-square'
                ],
            ]
        );

When i extract translation, the title ('title' => 'menu.select.icon.title',) is not extracted.

Thanks, Paulo

Guite commented 4 years ago

@pdias please test the patch I just provided here: https://github.com/php-translation/extractor/pull/148

Guite commented 4 years ago

@pdias you need also https://github.com/php-translation/symfony-bundle/pull/395

rvanlaak commented 4 years ago

fixed by https://github.com/php-translation/extractor/pull/148