-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Throw during i18n extraction if two different contents have the same @@id #18272
Copy link
Copy link
Closed
Labels
area: i18nIssues related to localization and internationalizationIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: i18nIssues related to localization and internationalizationIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues