【问题标题】:Angular i18n extract clobbers previous changes?Angular i18n 提取破坏以前的更改?
【发布时间】:2017-08-19 16:14:02
【问题描述】:

我正在尝试查看 Angular CLI 中是否有本地工作流

  1. 提取翻译
  2. 发送和接收翻译返回
  3. 使用新的复制块更新代码
  4. 再次提取 // 故障点
  5. 发送和接收翻译返回

如果我提取新的翻译会破坏旧的翻译。是否有协调两个提取的过程?还是有计划?预计开发团队会推出自己的产品吗?只求清晰

HTML:

<h1>Hello i18n!</h1>
  1. 提取翻译:

    <body>
      <trans-unit id="introductionHeader" datatype="html">
        <source>Hello i18n!</source>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/app.component.ts</context>
          <context context-type="linenumber">1</context>
        </context-group>
        <note priority="1" from="description">An introduction header for this sample</note>
        <note priority="1" from="meaning">site header</note>
      </trans-unit>
    </body>
    
  2. 发送和接收翻译返回

         <body>
          <trans-unit id="introductionHeader" datatype="html">
            <source>Hello i18n!</source>
            <target>HERRO i18n!</target>
            <context-group purpose="location">
              <context context-type="sourcefile">src/app/app.component.ts</context>
              <context context-type="linenumber">1</context>
            </context-group>
            <note priority="1" from="description">An introduction header for this sample</note>
            <note priority="1" from="meaning">site header</note>
          </trans-unit>
        </body>
    
  3. 使用新的复制块更新代码

    &lt;h1&gt;Hello i18n!&lt;/h1&gt; &lt;h1&gt;Goodbye i18n!&lt;/h1&gt;

  4. 再次提取将删除&lt;target&gt;translated content&lt;/target&gt;

因此所有内容都必须重新翻译。

有这方面的工作流程吗?

【问题讨论】:

    标签: angular internationalization workflow text-extraction


    【解决方案1】:

    看看这个工具:

    https://www.npmjs.com/package/ngx-i18nsupport

    我想这就是你要找的。​​p>

    【讨论】:

    • 能否请您提供一些背景信息,以说明如何实施?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-11
    • 2023-03-04
    • 1970-01-01
    • 2014-09-23
    • 1970-01-01
    相关资源
    最近更新 更多