8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Given this template, all translations are extracted twice.
Once for the correct translation domain (as specified by {% trans_default_domain %} and once wrongly for the default domain. This applies to the current template, its parent and the embedded one.
{% trans_default_domain %}
{% extends '::base.html.twig' %} {% trans_default_domain "users" %} {% block content_header %} <h1>{{ 'heading.create'|trans }}</h1> {% endblock %} {% block content_layout %} {# .. #} {% embed ':Layout:content_full_size.html.twig'%} {% trans_default_domain "users" %} {# .. #} {% endembed %} {% endblock %}
The text was updated successfully, but these errors were encountered:
Hi, what version of Symfony2 are you using?
Sorry, something went wrong.
The issue occurred in 2.1.7 and is still there after upgrading to 2.2.0-BETA2.
Ok, thanks, I'll give it a shot today and see if I can fix it.
Hi.
Sorry for delay. I've created the following gist but I've yet to encounter the problem. Am I doing something wrong?
That looks the way, we have templates.
You don't get Symfony - Welcome dumped as key under domain messages, but only in the domain users?
Symfony - Welcome
messages
users
@havvg actually the app/console translation:update --dump-messages --force en AcmeDemoBundle command will dump only messages.en.__format__.
app/console translation:update --dump-messages --force en AcmeDemoBundle
messages.en.__format__
Generating "en" translation files for "AcmeDemoBundle" Parsing templates Loading translation files Displaying messages for domain messages: 'Symfony - Welcome': '__Symfony - Welcome' embed: __embed
I'm using Symfony2 2.1.7 as well.
When I run php app/console translation:update de_DE OrmigoBundle --dump-messages, I got this result:
php app/console translation:update de_DE OrmigoBundle --dump-messages
Generating "de_DE" translation files for "OrmigoBundle" Parsing templates Loading translation files Displaying messages for domain messages: settings.header: __settings.header account.my_account: __account.my_account account.settings: __account.settings [ ... ] Displaying messages for domain account: settings.header: Einstellungen [ ... ] Displaying messages for domain breadcrumb: home: Ormigo account.my_account: 'Mein Konto' account.settings: Einstellungen [ ... ]
Adding the --force option will write all those into the output format (PDO), including the wrong/duplicate ones. Maybe, there is something different, that's causing the issue, so I put up this gist with more details on the templates: https://gist.github.com/havvg/3a779bf221e09acb181e
--force
Ah, so you only got it in messages? That would be wrong, too. I guess, I got the correct ones, because some of them are already present (translated) in their correct domain.
@havvg the problem is that TwigExtractor seems not to take trans_default_domain in account. I'll try to fix it today.
TwigExtractor
trans_default_domain
merged branch jfsimon/issue-6943 (PR #7206)
66c2be3
This PR was squashed before being merged into the 2.1 branch (closes #7206). Commits ------- bae83c7 [TwigBridge] fixed trans twig extractor Discussion ---------- [TwigBridge] fixed trans twig extractor | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6943
No branches or pull requests