Angular i18n - Error: Could not mark an element as translatable inside a translatable section

Angular i18n - Error: Could not mark an element as translatable inside a translatable section

在我的 Angular 7 应用程序中,我有一个 html 带有这样的嵌套标签 -

<p i18n="@@footerText">Some Text Here 
  <a i18n="@@footerLink" href="http://url.com" target="_blank">Link Text</a> 
  Another Text Here
</P>        

执行以下命令时

ng xi18n --output-path translate

它抛出一个错误-
错误:无法将可翻译部分内的元素标记为可翻译

How to use i18n with nested tags?

<p>
  <ng-container i18n="@@footerPrefix">Some Text Here</ng-container> 
  <a i18n="@@footerLink" href="http://url.com" target="_blank">Link Text</a> 
  <ng-container i18n="@@footerSuffix">Another Text Here</ng-container> 
</p>

或者将所有内容(包括 link)放入您的翻译中

<p i18n="@@footerText">Some Text Here 
  <a href="http://url.com" target="_blank">Link Text</a> 
  Another Text Here
</p>