Skip to content

Babel plugin drops many translator comments #225

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Anonymous

The Babel plugin is supposed to retain translator comments if they are on a line preceding a translated string. But the logic in the Babel plugin clears the collected translator comments when intervening nodes are encountered.

## This comment works just fine.
## Translators: days_early_for_beta should not be translated
${_("Enter days_early_for_beta:")}

## This one does not:
## Translators: days_early_for_beta should not be translated
<p>${_("Enter days_early_for_beta:")}</p>
## Because the "<p>" is a text node that clears the translator_comments list.

(Reported by Ned Batchelder, ned@nedbatchelder.com)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions