I've updated an existing Angular application that uses i18n to version 9. After doing this, it throws errors during build that it cannot find my translations:
No translation found for "6570363013146073520" ("Dashboard")
I noted that the ID provided above does not exist in my messages.xlf files and looks to be in a totally different format.
Here's what it looked like before Angular 9:
<trans-unit id="f65253954b66e929a8b4d5ecaf61f9129f8cec64" datatype="html">
<source>Dashboard</source>
<target state="final">The translated string</target>
</trans-unit>
I found this on Github that talks about the problem, but I don't understand how it's fixed. How do I tell Angular to use the "legacy format" that they are talking about in that issue?
Or is there another solution to this?
I know this is an old question, but I found a way to pass the error, you need to give id like this :
<h1 i18n="@@anyId">
I don't output any element
</h1>
instead of i18n="ba0cc104d3d69bf669f97b8d96a4c5d8d9559aa3", then in your .xlf file you need to use like this:
<trans-unit id="anyId" datatype="html">
<source>I don't output any element</source>
<target>Je n'affiche aucun élément</target>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">10</context>
</context-group>
</trans-unit>
well by this, error will be vanished.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With