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

collapseWhitespace and trim not applied to translationTargetFile resulting in target state reset #102

Closed
mbey-mw opened this issue Feb 16, 2024 · 0 comments · Fixed by #103
Labels
bug Something isn't working

Comments

@mbey-mw
Copy link
Contributor

mbey-mw commented Feb 16, 2024

Describe the bug
Translation tool lokalize (v23.08.1) adds line break to source/target when ending with interpolation. This is the observable change when saving in lokalize:

-      <trans-unit id="AudioChannelNumber" datatype="html">
-        <source>Audio Channel <x equiv-text="{{c}}" id="INTERPOLATION"/></source>
+      <trans-unit datatype="html" id="AudioChannelNumber">
+        <source>Audio Channel <x equiv-text="{{c}}" id="INTERPOLATION"/>
+        </source>
        <target state="signed-off">Canal Audio <x equiv-text="{{c}}" id="INTERPOLATION"/></target>
      </trans-unit>

This results in a target state change from signed-off to new after a run of ng-extract-i18n-merge.

Expected behavior
When using "collapseWhitespace": true and "trim": true it should not change the target state because the source is the same (after normalization).

Version (please complete the following information):

  • Angular: 17.1.2
  • OS: Ubuntu 23.10
  • nodejs: 20.11.0
  • ng-extract-i18n-merge version: 2.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant