Skip to content

Throw during i18n extraction if two different contents have the same @@id #18272

@ocombe

Description

@ocombe

I'm submitting a...

[x] Feature request

Current behavior

If you use custom ids for i18n translations and you have multiple elements with that custom id that have different contents, you will only get one translation extracted.
e.g.: <div i18n="@id">Hello world</div> and <div i18n="@id">Bye world</div>
Only the first one will be extracted, and they will both be replaced by the same content when you use translations, but will be different in the source language.

Expected behavior

We should throw an error, or at least print a warning when we extract if we have the same id for different contents.

What is the motivation / use case for changing the behavior?

Avoid errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions