-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ts] Request to collapse empty XML elements #1118
Comments
This behavior comes from translate-toolkit, library we use for manipulation with the files. The closing tags were added intentionally in translate/translate@e2b714e, see also translate/translate#1420. For the header this was already discussed in https://github.com/nijel/weblate/issues/462, but I don't think anybody has talked with translate-toolkit upstream to address this. |
Ah, thanks for the pointers! It's interesting that they already tried to match the Qt Linguist format better, but the "Pretty-print empty tags without self-closing them" is only half the story, since while Qt Linguist does not self-close the |
I've opened translate/translate#3443 for this. |
Updated in translate/translate#3465. The difference which is left open is the handling of '/" vs. '/". |
The first PR to translate got merged. Now i submitted translate/translate#3470 for writing quotes as entities. Since this requires postprocessing of the XML output, it somewhat slows down saving as .ts. |
Closing this issue as there is nothing what could be done on Weblate side to improve this. |
@nijel You mean Weblate will automatically pick up this improvement once translate/translate#3470 is merged? |
Is Weblate already updated to use the improvements submitted in translate/translate#3465? |
Weblate will use installed translate-toolkit, so whatever fixes it has, those will work in Weblate. |
Steps to reproduce
<location line="+83"></location>
<location line="+83"/>
), it leads to huge diffs when Weblate and Qt Linguist are used interchangeably.Expected behaviour
Collapsing empty XML elements makes sense both for avoiding these huge diffs as well as for space-saving reasons, since it is unnecessary verbosity.
There are some other differences in the output (another example below), but the expanded XML elements are causing by far the most changes.
Server configuration
Using hosted Weblate (https://hosted.weblate.org/projects/tiled/)
The text was updated successfully, but these errors were encountered: