You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Throw during i18n extraction if two different contents have the same @@id #18272
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.
Reacted by Peter Farkas, Serrulien and mateusz-stopka
Please highlight the same id for different contents thing. With the application I'm working on, we do have several elements with the same contents. For those, it must be possible to the use the same custom id without any warning.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Activity
db6edr commentedon Aug 8, 2017
Please highlight the same id for different contents thing. With the application I'm working on, we do have several elements with the same contents. For those, it must be possible to the use the same custom id without any warning.
ocombe commentedon Sep 19, 2017
Of course, this would only warn if the content is different
angular-robot commentedon Jun 4, 2021
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
angular-robot commentedon Jun 24, 2021
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
petebacondarwin commentedon Jun 24, 2021
Closing as we actually do now register warnings or errors for duplicate messages with different contents.
angular-automatic-lock-bot commentedon Jul 25, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.