I'm submitting a ... (check one with "x")
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior
translate directive and pipe dont transform unknown value in same way
when directive meet unknown value output the value itself, but cannot changed.
pipe performs well
Reproduction of the problem
https://stackblitz.com/edit/angular-qjsz5l
ngx-translate version: 9.1
Angular version: 5.2
And pipe transform show first empty string but directive show first path to translate string.
I detect also some weirds behaviours when you add content inside the element that is translated.
These two snippets are NOT working properly:
<el1 [translate]="'I18N.KEY'">
<el2>other content</el2>
</el1>
Displays only the "other content" skipping the translation.
<el1 translate>I18N.KEY
<el2>other content</el2>
</el1>
The translation is not anymore translated on language change.
Here is the stackblitz : https://stackblitz.com/edit/91k00-ngx-translate-bug
Most helpful comment
And pipe transform show first empty string but directive show first path to translate string.