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

Load translations from Translator's message catalogue #346

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

drola
Copy link

@drola drola commented Oct 19, 2023

Load translations from Translator's message catalogue

Context:

Existing implementation of BazingaJsTranslationBundle re-implements loading messages from files on disk. However, this implementation is not 1-to-1 compatible with message loading in Symfony's translator component. Thus some translations are not visible to BazingaJsTranslationBundle.

For example, LexikTranslationBundle stores messages in a DB,

This PR re-implements message discovery, such that it relies on Symfony\Component\Translation\Translator.

This change was suggested in #277.

Backwards Compatibility:

  • APIs, nor output of Dumper or Controller didn't change.
  • TranslationFinder does not exist anymore.

@drola drola force-pushed the use-translator-message-catalogue branch from d2b77a6 to edd2c02 Compare October 20, 2023 08:14
Util.php Outdated Show resolved Hide resolved
@monteiro
Copy link
Collaborator

Hi @drola , can you rebase it? Thanks for your first contribution!

@drola drola force-pushed the use-translator-message-catalogue branch from 3b2a69a to 4c7383a Compare December 19, 2023 09:57
@drola
Copy link
Author

drola commented Dec 19, 2023

Hi @drola , can you rebase it? Thanks for your first contribution!

Hey, @monteiro! It's rebased now.

Happy to help, I use this bundle in several projects.

@betoobe6
Copy link

Hi there,

I'm glad someone solved this ! Do you know when it will be available in the release ?
We are using LexikTranslationBundle and would love to have only one translation WF !

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

Successfully merging this pull request may close these issues.

4 participants