core
core copied to clipboard
Translation key gets used as value when using content as key in template
Current behavior
We recently upgraded from version 11.0.0 to 14.0.0. It now seems that using content as key causes the key to be displayed instead of the value whenever the key is updated e.g.
<div translate>HELLO</div>
This is not the case when using the directive normally or with pipe e.g.
<div [translate]="HELLO"></div>
<div>{{ HELLO | translate }}</div>
Expected behavior
Value should always be translated.
How do you think that we should fix this?
Minimal reproduction of the problem with instructions
Link to stackblitz: https://stackblitz.com/edit/angular-ivy-xqvdjn?file=src/app/app.component.html
Environment
ngx-translate version: 14.0.0
Angular version: 14.0.0
Browser:
- Chrome (desktop) version 102.0.5005.63
For Tooling issues:
- Node version: 14.15.0
- Platform: Windows 10
Others:
N/A