sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
319 stars 139 forks source link

Fix translation #756

Closed wbloszyk closed 4 years ago

wbloszyk commented 4 years ago

Subject

Copy translations files to work propertly when user do not register bridges.

I am targeting this branch, because this change respect BC.

Closes https://github.com/sonata-project/form-extensions/issues/98#issuecomment-639377432

Changelog

### Fixed
- fix translations when user do not register bridges
jordisala1991 commented 4 years ago

This fixes the issue @VincentLanglet ?

wbloszyk commented 4 years ago

I reproduce it and it is work. It is problem when user do not register form bridge - translation files are missing then.

jordisala1991 commented 4 years ago

The only problem would be if I change SonataCore translations on my own app, and suddenly update and they are no longer used because we changed the translation_domain... not sure if we are willing to do this kind of BC break, WDYT @greg0ire ?

Will that happen? @wbloszyk

VincentLanglet commented 4 years ago

Yes, but do we have a way to avoid this BC-break during the 0.x migration ?

wbloszyk commented 4 years ago

We can change translation_domain to CoreBundle in form-extensions and add require CoreBundle too. It means CoreBundle will be require for extensions 0.x branch and conflict to 1.x. This will be BC but that when user do not register CoreBundle? CoreBundle translations is in form-extensions now.

VincentLanglet commented 4 years ago

We can change translation_domain to CoreBundle in form-extensions and add require CoreBundle too.

I would prefer to avoid this, in other to drop the CoreBundle dependency.

We could change translation_domain to CoreBundle in form-extensions and just copy the translation.

wbloszyk commented 4 years ago

@VincentLanglet Something like this? https://github.com/sonata-project/form-extensions/pull/99

wbloszyk commented 4 years ago

Close in favor https://github.com/sonata-project/form-extensions/pull/99