lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
422 stars 259 forks source link

Escape domain name in URL #365

Closed rimas-kudelis closed 2 years ago

rimas-kudelis commented 4 years ago

I noticed that unescaped domain name may cause issues sometimes.

To be more concrete, I have my translations in messages+intl-icu.LANG.yaml file, but when I click on that file in the list, no results (translation strings) are shown, because what ends up in the domain filter box is actually not "messages+intl-icu", but "messages intl-icu". This little patch fixes that issue.

Note: I think presenting "messages" and "messages+intl-icu" as separate domains is the actual problem, which this patch does not address. I just wanted to pick the lowest hanging fruit and be done with it for now.

kbosilkov commented 4 years ago

@rimas-kudelis how did you import the translations? On my side doesn't find admin+intl-icu.LANG.yaml at all.

rimas-kudelis commented 4 years ago

@kbosilkov I'm not sure what you're asking, but I see both messages and messages+intl-icu in the list of translation domains, because I use ICU-enabled translations in my project.

kbosilkov commented 4 years ago

@kbosilkov I'm not sure what you're asking, but I see both messages and messages+intl-icu in the list of translation domains, because I use ICU-enabled translations in my project.

When I try to import ICU enabled translations the command did not find the files. The workaround is to rename the files without ICU suffix, then import them and manually update the domain in the database.

rimas-kudelis commented 4 years ago

I think it worked out of the box for me.

rimas-kudelis commented 2 years ago

Fixed in #387.