symfony: Unable to dump multi format translations for same domain
Symfony version(s) affected: 4.4.2
Description
We have a translation process where translations are downloaded from an external service then dumped to translation files.
We have two translation formats (Symfony format and icu) for thousands of translations (legacy were using Symfony format, and new ones are using icu).
These translations once retrieved were dumped with XliffFileDumper
to two files messages.en.xlf
and messages+intl-icu.en.xlf
(each one supporting a different format).
Since #34797 was merged, it is not possible anymore to dump two files for same translation domain but with two different formats (icu and Symfony format). All translations are dumped to the same file messages+intl-icu.en.xlf
as class \MessageFormatter
exists.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (19 by maintainers)
@ruudk thanks for your input, I think you found a bug that has not been reported yet. Could you please create a reproducer for that? It would be better create also a separate issue. Thanks again 😃
@yceruto That’s not the case. I’m converting YAML to PHP, I guess that the PHP dumper only looks for it’s own type.
I created a POC that demonstrates the bug. This is my code: https://github.com/ruudk/symfony-translation-bug-poc/commit/86c05a68a9f53738db237e9f6bbe665f3c36802e
And this is what happens when I run the command: https://github.com/ruudk/symfony-translation-bug-poc/commit/84290da4060b533df69d18ba3b7b50df0d4c9dc3
Hope this helps.