Skip to content

Twig: path pattern: Missing Translation Domain #255

@luxemate

Description

@luxemate

Let's say I have this code in a twig template:

{{ sonata_block_render({
    'type': 'nice_block',
    'settings': {
        'title': 'block.nice.title',
        'more_url': path('more_nice_stuff'),
        'sub_partner_id': app.request.query.get('sub_partner_id')
    }
}) }}

When I add the title like 'block.nice.title'|trans, path('more_nice_stuff') and app.request.query.get('sub_partner_id') arguments are highlighted, and say Missing Translation Domain.

If title would be the second setting and more_url would be the first, then only app.request.query.get('sub_partner_id') would be highlighted as a warning.

Outside of that echo block parameters are detected as usual, without warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions