Skip to content

JInja extraction fails silently without error if there's an unrecognized do statement with {a:b} inside #1216

@johnzhou721

Description

@johnzhou721

See the following MWE.

[templates/test.html]

{% set a = "foo" %}
{% set b = "bar" %}
{% set d = [1, 2, 3] %}
{% set mydict = {} %}

{% for c in d %}
  {% do mydict.update({a: b}) %}
{% endfor %}

{{ _("Hello!") }}

Deleting the entirely nonsense block before _("Hello") makes it able to extract Hello, but in its current state, no messages are extracted.

[babel.cfg]

[jinja2: templates/**.html]
encoding=utf-8

Anyways: Babel 2.17.0 is used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions