Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing catalogues: breaks locale fallbacks in symfony/ux-translator #461

Open
SosthenG opened this issue Sep 2, 2024 · 0 comments
Open

Comments

@SosthenG
Copy link

SosthenG commented Sep 2, 2024

Without this bundle, the getLocaleFallbacks in symfony/ux-translator iterates through a lot of catalogues and dumps a json object with for each possible language code the fallback language.

With this bundle installed and my configuration (see below), there now seems to be only one catalogue without a "fallbackCatalogue" configured (the catalogue for my default locale "fr", the only one for which I have translations loaded in database at the moment), so it just dumps a json object with the default locale and null as a value.
This breaks the ux-translator because it cannot find the fallbacks for other languages.

lexik_translation:
    fallback_locale: ['fr']
    managed_locales: ['fr', 'en', 'de']
    grid_input_type: textarea
    exporter:
        use_yml_tree: true

I tried this option in my configuration just to check, thinking it might be linked but it did not change anything:

    resources_registration:
        type: files
        managed_locales_only: false

I guess this bundle have to replace the existing catalogues to work with the database translations, but it still strange to me because I do have translations in files for other languages (some bundles translations, not directly for my app), so those catalogues that are in the array without this bundle should still be present no?
Is this an issue that can be resolved or do I need to find a workaround to use this with ux-translator?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant