WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.33k stars 970 forks source link

XWiki page based translation are serialized with a white space in front of the ending </xwikidoc> #11896

Closed tmortagne closed 1 week ago

tmortagne commented 1 week ago

Describe the issue

When a new translation is committed, it contains a strange white space in front of the ending </xwikidoc>. It's a bit annoying since it cause xar:format to produce unexpected changes when it's executed later on the project.

I already tried

Steps to reproduce the behavior

Start translating a new locale.

Expected behavior

Not having a white space in front of the ending </xwikidoc>.

Screenshots

https://github.com/xwiki/xwiki-platform/pull/3211/files#diff-f1232b93d79779d15c266e620853c554c767cb58a680f03a14e7c91b61724465R139

Exception traceback

No response

How do you run Weblate?

PyPI module

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

surli commented 1 week ago

Related unit test to fix: https://github.com/WeblateOrg/weblate/blob/main/weblate/trans/tests/data/XWikiPageProperties.xml#L52

surli commented 1 week ago

@nijel you can assign that one to me.

github-actions[bot] commented 1 week ago

The issue you've reported needs to be addressed in the translate-toolkit. Please file the issue there, and include links to any relevant specifications about the formats (if applicable).

nijel commented 1 week ago

I guess that fix in https://github.com/translate/translate/pull/5269 is sufficient, closing this issue now. It now needs a translate-toolkit release to be used by Weblate (which will take some time because one release was this week).

github-actions[bot] commented 1 week ago

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

surli commented 1 week ago

I guess that fix in https://github.com/translate/translate/pull/5269 is sufficient, closing this issue now. It now needs a translate-toolkit release to be used by Weblate (which will take some time because one release was this week).

To be checked but I think https://github.com/WeblateOrg/weblate/blob/main/weblate/trans/tests/data/XWikiPageProperties.xml#L52 needs to be fixed too: you'll probably get test failures right now.

nijel commented 1 week ago

That is used for parsing only (at list this is the case for other formats), so that should be fine.