Skip to content

Translate fails if string contains & #262

Open
@mpiasta-ca

Description

@mpiasta-ca

Suppose we have a case like this:

<span translate>Test & Execute</span>

If we extract strings, the extraction will appear in your *.pot file, as expected.

But when you make translation (ie. "tester et exécuter") and generate Json files, if you load the website and select the translation, the translated string will not appear.

Instead, you will still see "Test & Execute" where you expect "tester et exécuter".

This works:

<span translate>Test &amp; Execute</span>

Writing "&" was required in HTML4 specifications, but it's no longer the case. According to HTML5 specifications, using "&" is valid (see: ambigious ampersands).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions