Skip to content

Released version 2.0

Compare
Choose a tag to compare
@Warxcell Warxcell released this 15 Dec 13:34
· 74 commits to master since this release

Changelog:

  • Twig filters translate and translation now accept arguments in different order and locale is not required:

Before:

{{ news|translate('en', 'title')|lower }}

Now

{{ news|translate('title')|lower }}
{{ news|translate('title', 'en')|lower }}
  • Drop support for Symfony 2.7. Now only ~2.8 and ~3.0 are supported.
  • Add tests for forms, translator and other components.
  • Load translations on postPersist event for Doctrine.
  • Use brand-new Form Type for translations instead of extending Symfony's Collection Type.
  • Method setTranslatable(Translatable $translatable) for EditableTranslation is not required now. You should use addTranslation and removeTranslation if you use form (by_reference=false).
  • Remove vm5_entity_translations.translation_loader service. Use vm5_entity_translations.translator or FQCN instead.
  • Add Bootstrap Form template using tabs for each language.
  • Add translate method in Translator: You can now use: Translator::translate($translatable, 'field', $locale = null) to retrieve translated field directly. Internally translator use PropertyAccessor and it's required to pass it thru: setPropertyAccessor method.