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
Allow specifying an i18n ID rather than generating it from the content #13781
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Currently, the ID of messages to translate are generated based on the content of the element with the i18n attribute.
This is extremely painful and causes several problems:
as soon as the content is modified or simply reformatted (like for example simply adding a meaningless line break), the ID changes and all the message files must be impacted
some contents might be identical in the base language, but have a different translation in other languages (for example, "free" might mean "free as in speech" or "free as in beer", and other languages have different words for that)
some contents can be identical in two different contexts in the base language, but need to be have different translations in other languages to avoid potential ambiguities.
Expected behavior
It would be much easier to maintain if the developer could simply choose the ID (as an optional additional feature):
Or if the ID was computed based on the value of the i18n attribute if present, rather than based on the content of the element.
What is the motivation / use case for changing the behavior?
Avoid having to constantly change the IDs in all the message files when the message is just reformatted or slightly changed. Make it simpler to specify two different translation units even if the base content is identical.
Activity
vicb commentedon Jan 4, 2017
jnizet commentedon Jan 4, 2017
@vicb That's great news. Sorry for not noticing, and thank you!
angular-automatic-lock-bot commentedon Sep 10, 2019
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.