Skip to content

Releases: a2lix/TranslationFormBundle

3.2.4

09 Apr 14:10
7c0a3a1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.2.3...3.2.4

3.2.3

03 Jan 11:58
d42642e
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.2.1...3.2.3

3.2.1

11 Apr 17:50
ca3bf7b
Compare
Choose a tag to compare

What's Changed

  • 🐛 Fix form validation when locale is required (knp behaviors) by @grizzlylab in #369

Full Changelog: 3.2.0...3.2.1

3.2.0

14 Jan 14:18
Compare
Choose a tag to compare

This minor release allows AutoFormBundle ^0.4 following a2lix/AutoFormBundle#29

Full Changelog: 3.1.0...3.2.0

3.1.0: Allow Symfony 6.0+

12 Jan 10:52
36f6211
Compare
Choose a tag to compare

This release allows Symfony 6.0+ and adds new tests for PHP8.0 and PHP8.1 in the CI workflows

  • Allow PHP8 in CI (#367)
  • Allow Symfony 6.0+ (#368)

Full Changelog: 3.0.10...3.1.0

3.0.10

22 Dec 18:14
88ff44b
Compare
Choose a tag to compare

This release only adds a small feature to allow customisable labels for translation

Add translatable locale labels (#365)

Documentation for this feature

You may now set labels for each tab by adding a locale_labels array to the TranslationsType form type, like so:

$form = $this->factory->createBuilder(FormType::class, new Product())
    ->add('translations', TranslationsType::class, [
        'locale_labels' => [
            'fr' => 'Français',
            'en' => 'English',
        ],
    ])
    ->add('save', SubmitType::class)
    ->getForm()
;

If a label is not set here (in this examplen de for instance), its value will default to null and the previous behaviour will kick-in (the template with capitalize the locale name).

Hence, this does not introduce any breaking change and no change of defaults, and seems perfectly safe.

As the trans filter is used in the templates, you can also use translation keys directly here:

$form = $this->factory->createBuilder(FormType::class, new Product())
    ->add('translations', TranslationsType::class, [
        'locale_labels' => [
            'fr' => 'admin.language.fr.tab_title',
            'en' => 'admin.language.en.tab_title',
        ],
    ])
    ->add('save', SubmitType::class)
    ->getForm()
;

See also: https://a2lix.fr/bundles/translation-form/3.x.html#bundle-usage

3.0.9

21 Dec 08:25
7e17244
Compare
Choose a tag to compare

Fix multiple partial translations (#354) — Thanks @adelinerobinet

ℹ️ A note on this release:

This release might introduce a BC break if you were using the id attribute of a partial translation div to target it in CSS or Javascript, like so for instance:

#Article_translations_fr_a2lix_translations-fields {
    border: 1px solid green;
}

You must now use the full id that includes a concatenation of field names (See here)

3.0.8

14 Dec 15:16
880f9ae
Compare
Choose a tag to compare

3.0.7

03 Apr 09:03
4a5f7c3
Compare
Choose a tag to compare
  • Github Action replace Travis
  • PHP-CS-Fixer new rules
  • Bootstrap 3 compatibility (#344) - Thanks @sophie-mulard

3.0.6: Allow SF5

05 Nov 10:50
Compare
Choose a tag to compare
Allow usage of a2lix/auto-form-bundle ^0.3 which allows Symfony 5 (#339)