Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running Sync-XliffTranslations with a target, which contains needs-adaptation targets, which have "Source text has changed" notes, note gets removed. #35

Open
gergely-gyorgy-both opened this issue Oct 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@gergely-gyorgy-both
Copy link

I have a messages.xlf and a messages.en-US.xlf file. If a source node gets modified in messages.xlf, it appears in messages.en-US.xlf as the target state is needs-adaptation, and a note is added saying that the source text has changed.

<trans-unit id="test" datatype="html">
        <source>Modified text</source>
        <target state="needs-adaptation">Original text</target>
        <note from="XLIFF Sync" annotates="general" priority="1">Source text has changed. Please review the translation.</note>
        <context-group purpose="location">
          <context context-type="sourcefile">src/app/overview/component/current-status/current-status-advanced-filter/current-status-advanced-filter.component.ts</context>
          <context context-type="linenumber">276</context>
        </context-group>
</trans-unit>

This is totally OK.
But, if I re-run the same command, the <note> node gets removed, but everything else stays the same. The expected result would be that the note remains there if the target's state is still needs-adaptation.

Command used for generation:
Sync-XliffTranslations -sourcePath "messages.xlf" -targetPath "messages.en-US.xlf"

messages.xlf used:

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
  <file source-language="dev" datatype="plaintext" original="ng2.template">
    <body>
    <trans-unit id="test" datatype="html">
      <source>Modified text</source>
      <context-group purpose="location">
        <context context-type="sourcefile">src/app/overview/component/current-status/current-status-advanced-filter/current-status-advanced-filter.component.ts</context>
        <context context-type="linenumber">276</context>
      </context-group>
    </trans-unit>
    </body>
  </file>
</xliff>
@rvanbekkum rvanbekkum added the enhancement New feature or request label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants