Angular 发生未处理的异常:缺少必需的<;目标>;要素

Angular 发生未处理的异常:缺少必需的<;目标>;要素,angular,angular-i18n,Angular,Angular I18n,我的i18n文件在Angular 9中出错: An unhandled exception occurred: Missing required <target> element 有什么想法吗? 谷歌目前对此一无所知 谢谢大家 XLIFF是专门为存储翻译而设计的XML格式。您现在拥有的只是源字符串(在本例中为英语字符串)。你也需要翻译,但是一份原文也可以。这将存储在目标元素中。创建XLIFF的应用程序有时可能会这样做,但在翻译过程中,它更多地是由专门为本地化设计的应用程序添加的 如

我的i18n文件在Angular 9中出错:

An unhandled exception occurred: Missing required <target> element
有什么想法吗? 谷歌目前对此一无所知


谢谢大家

XLIFF是专门为存储翻译而设计的XML格式。您现在拥有的只是源字符串(在本例中为英语字符串)。你也需要翻译,但是一份原文也可以。这将存储在目标元素中。创建XLIFF的应用程序有时可能会这样做,但在翻译过程中,它更多地是由专门为本地化设计的应用程序添加的

如果您想发送文件,我可以为您正确插入目标元素

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
  <file source-language="en-US" datatype="plaintext" original="ng2.template">
    <body>
      <trans-unit id="63a327955e558b8eb3bf5dc27b5d04920eb9f58d" datatype="html">
        <source>Crop Watch</source>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/core/app.component.html</context>
          <context context-type="linenumber">3</context>
        </context-group>
      </trans-unit>
      <trans-unit id="2df64767cd895a8fabe3e18b94b5b6b6f9e2e3f0" datatype="html">
        <source>TODAY</source>
        <context-group purpose="location">
          <context context-type="sourcefile">node_modules/@progress/kendo-angular-dateinputs/dist/es2015/calendar/calendar.component.d.ts</context>
          <context context-type="linenumber">4</context>
        </context-group>
        <note priority="1" from="description">The label for the today button in the calendar header</note>
        <note priority="1" from="meaning">kendo.calendar.today</note>
      </trans-unit>
      <trans-unit id="a55944f9de69e7cc86b91200fe96f980a947d704" datatype="html">
        <source>Increase value</source>
        <context-group purpose="location">
          <context context-type="sourcefile">node_modules/@progress/kendo-angular-dateinputs/dist/es2015/dateinput/dateinput.component.d.ts</context>
          <context context-type="linenumber">4</context>
        </context-group>
Angular CLI: 9.0.5
Node: 12.14.1
OS: win32 x64

Angular: 9.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.5
@angular-devkit/build-angular     0.900.5
@angular-devkit/build-optimizer   0.900.5
@angular-devkit/build-webpack     0.900.5
@angular-devkit/core              9.0.5
@angular-devkit/schematics        9.0.5
@angular/cdk                      9.1.1
@angular/material                 9.1.1
@ngtools/webpack                  9.0.5
@schematics/angular               9.0.5
@schematics/update                0.900.5
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2