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

XLIFF exported files source tag doesn't contain the source HTML tags #5818

Closed
lacroixdavid1 opened this issue Apr 9, 2021 · 6 comments
Closed
Assignees
Labels
bug Something is broken.
Milestone

Comments

@lacroixdavid1
Copy link

lacroixdavid1 commented Apr 9, 2021

Describe the issue

When exporting in XLIFF, the source HTML tags are stripped out. This causes issues when exporting to an XLIFF file and then reimporting into Weblate. Weblate will skip because the source doesn't match.

To Reproduce the issue

Steps to reproduce the behaviour:

  1. Create a translated key and add HTML in the content
  2. Export it to XLIFF
  3. The source content doesn't have HTML tags.
  4. Change the target tag content
  5. Reimport the file
  6. Weblate will say it didn't find the string.
Processed 1 string from the uploaded files (skipped: 0, not found: 1, updated: 0).

Expected behaviour

The exported source tag should contain the original HTML so it can be imported again or there should be an option to rely only on the translation ID for comparison when importing.

Screenshots

Exported language. See the translated tag has the HTML tags but the source does not.

<trans-unit xml:space="preserve" approved="yes" id="a_new_version_is_available_message" weblate-flags="angularjs-format, safe-html, strict-same">
   <source>A new version of our application was just released. Your browser will automatically refresh {{appWillReloadAtTime}} or click here to refresh now.</source>
   <target state="translated">A new version of our application was just released. Your browser will automatically refresh {{appWillReloadAtTime}} or <a ef-i18n-click="reloadApplication">click here to refresh now</a>.</target>
   <note from="developer">NetworkUI / AffiliateUI / AdvertiserUI</note>
</trans-unit>
@nijel
Copy link
Member

nijel commented Apr 10, 2021

What Weblate version do you use? It might be a duplicate of #3762.

@nijel nijel added the question This is more a question for the support than an issue. label Apr 10, 2021
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@lacroixdavid1
Copy link
Author

We're running Weblate 4.5.1. Thanks for your quick reply.

@lacroixdavid1
Copy link
Author

Any ideas?

@nijel nijel added this to the 4.6 milestone Apr 13, 2021
@nijel nijel added bug Something is broken. and removed question This is more a question for the support than an issue. labels Apr 13, 2021
@nijel nijel self-assigned this Apr 13, 2021
@nijel nijel closed this as completed in 3c06ab3 Apr 13, 2021
@lacroixdavid1
Copy link
Author

Thank you @nijel.

@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants