本地化i18n字符串时如何排除其他元数据

时间:2018-08-24 21:41:09

标签: angular localization angular-i18n

升级到angular 6.1.1时,看起来好像有些其他元数据标签现在包含在所生成的xmb文件中。例如,这是一个使用角度4的xmb片段的示例:

<msg id="1143311040585987910" desc="description" meaning="channel#id">
<source>mycomponent.ts:8,10</source>
    Hello
<ph name="INTERPOLATION">
  <ex>INTERPOLATION</ex>
</ph>?

这是升级到角度6.1.1之后的输出:

<msg id="1143311040585987910" desc="description" meaning="channel#id">
<source>mycomponent.html:8,10</source>
    Hello
<ph name="INTERPOLATION">
  <ex>{{ (target$ | async)?.token | async }}</ex>
</ph>?

请注意,现在如何在插值部分(<ex>{{ (target$ | async)?.token | async }}</ex>)中输出插值字符串。

运行npm run xi18n时是否可以禁用此功能?这会导致我们的本地化过程出现很多问题,我们宁愿不要编写每次都运行的字符串解析器

0 个答案:

没有答案