Skip to content

[2.8][Translation] added DoctrineMessageCatalogue. #16036

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

Closed
wants to merge 1 commit into from

Conversation

aitboudad
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets #13948, #2570, #13676
Tests pass? yes
License MIT

Hi,
This PR add message_catalogue_provider option to the configuration to specify a different MessageCatalogue provider and add DoctrineMessageCacheProvider to allow keep messages in a key-value-store type cache (#13986)

#config.yml
framework:
    translator:
        message_catalogue_provider: translation.message_catalogue_provider.doctrine_cache

doctrine_cache:
    providers:
        translation_cache:
            memcached:
                servers:
                    localhost: 11211
#services.yml
translation.message_catalogue_provider.doctrine_cache:
    class: Symfony\Bridge\Doctrine\Translation\DoctrineMessageCatalogueProvider
    arguments: [@translation.message_catalogue_provider.resource, @doctrine_cache.providers.translation_cache, %kernel.debug%]

@aitboudad
Copy link
Contributor Author

This depends on the un-merged PR #14671

*/
class DoctrineMessageCatalogue extends MessageCatalogue
{
const PREFIX = 'sf2_translation';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for prefixes. doctrine cache has so called namespaces which people can use to avoid collisions.

@fabpot
Copy link
Member

fabpot commented Jan 25, 2016

@aitboudad I'm closing this one as we should now use the Symfony cache component.

@fabpot fabpot closed this Jan 25, 2016
@aitboudad aitboudad deleted the translation_catalogue_cache branch January 25, 2016 12:32
@aitboudad
Copy link
Contributor Author

@fabpot ok, I'll try to work on it once I have time :)

@fabpot
Copy link
Member

fabpot commented Jan 25, 2016

Thank you

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

Successfully merging this pull request may close these issues.

4 participants