Angular6 角度i18n-错误:未找到值“的复数消息”;0“;

Angular6 角度i18n-错误:未找到值“的复数消息”;0“;,angular6,angular-i18n,Angular6,Angular I18n,我遵循Angular i18n的开发指南: 我定义了一个复数文字,如下所示: <span i18n>Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}</span> minutes = 0; ng serve --port 4300 --configuration=fr <trans-unit id="5a134dee89358

我遵循Angular i18n的开发指南:

我定义了一个复数文字,如下所示:

<span i18n>Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}</span>
minutes = 0;
ng serve --port 4300 --configuration=fr
<trans-unit id="5a134dee893586d02bffc9611056b9cadf9abfad" datatype="html">
    <source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago} }</source>
    <context-group purpose="location">
      <context context-type="sourcefile">app/tenants/tenant1/tenant1.module.ts</context>
      <context context-type="linenumber">4</context>
    </context-group>
    <target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes} }</target>
  </trans-unit>
我正在这样运行我的应用程序:

<span i18n>Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}</span>
minutes = 0;
ng serve --port 4300 --configuration=fr
<trans-unit id="5a134dee893586d02bffc9611056b9cadf9abfad" datatype="html">
    <source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago} }</source>
    <context-group purpose="location">
      <context context-type="sourcefile">app/tenants/tenant1/tenant1.module.ts</context>
      <context context-type="linenumber">4</context>
    </context-group>
    <target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes} }</target>
  </trans-unit>
我对messages.fr.xlf的定义如下:

<span i18n>Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}</span>
minutes = 0;
ng serve --port 4300 --configuration=fr
<trans-unit id="5a134dee893586d02bffc9611056b9cadf9abfad" datatype="html">
    <source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago} }</source>
    <context-group purpose="location">
      <context context-type="sourcefile">app/tenants/tenant1/tenant1.module.ts</context>
      <context context-type="linenumber">4</context>
    </context-group>
    <target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes} }</target>
  </trans-unit>
请问,我做错了什么?

解决方案:

我没有正确导入包含NgPluralNgSwitch的CommonModule

import { CommonModule } from '@angular/common';