0

I am in the middle of migrating a bunch of angular apps from v11 to v14/15, but I hit a problem when running ng extract-i18n --format=legacy-migrate (with enableI18nLegacyMessageIdFormat=true in tsconfig) to migrate the legacy i18n IDs.

A lot of tags with the i18n attribute are missing from the generated messages.json file containing the mapping of the old and new IDs.

E.g in one of my modals if have

<h6 class="..." i18n>Terms & Conditions</h6> which is getting mapped, but a few lines lower I got

<p i18n>All content included on this site, ...</p> which is not getting mapped for some reason.

In my message.xlf I see that all some strings are pointing to .ts file some to the .html, seemingly without any logic I can makke out.

<context context-type="sourcefile">src/app/view/shared/item-actions/item-actions.component.ts</context>

Also I realize that I cannot have line-breaks or nested tags in the to-translate string, else the command skips it as well.

Anyone knows how to resolve the issue ?

Lumpenstein
  • 1,250
  • 1
  • 10
  • 27

0 Answers0