willdurand / BazingaJsTranslationBundle

A pretty nice way to expose your Symfony translation messages to your client applications.
MIT License
572 stars 178 forks source link

Translations generate / merge fail php8 #313

Open grekpg opened 3 years ago

grekpg commented 3 years ago

Hi i found that my messages file is almost empty

file Bazinga\Bundle\JsTranslationBundle\Controller in method getTranslationsAction

i see in loop foreach ($files as $filename) { $translations[$locale][$currentDomain] = array();

this clear array , when i add

if(!isset($translations[$locale][$currentDomain]))
$translations[$locale][$currentDomain] = array(); 

this fix error,

or maybe this fragment make problem:

[$currentDomain] = Util::extractCatalogueInformationFromFilename($filename);

but how to fix it on production ?

thislg commented 3 years ago

This issue was fixed in https://github.com/willdurand/BazingaJsTranslationBundle/pull/305 and the fix was released in https://github.com/willdurand/BazingaJsTranslationBundle/releases/tag/4.0.1