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

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

Closed
2 tasks done
tmortagne opened this issue Jun 19, 2024 · 7 comments
Closed
2 tasks done
Assignees
Labels
bug Something is broken. translate-toolkit Issues which need to be fixed in the translate-toolkit

Comments

@tmortagne
Copy link

tmortagne commented Jun 19, 2024

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

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

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
Copy link
Contributor

surli commented Jun 19, 2024

@tmortagne tmortagne changed the title XWiki page based translation are serialized with a white space in front of the ending </document> XWiki page based translation are serialized with a white space in front of the ending </xwikidoc> Jun 19, 2024
@surli
Copy link
Contributor

surli commented Jun 19, 2024

@nijel you can assign that one to me.

@nijel nijel added the bug Something is broken. label Jun 19, 2024
surli added a commit to surli/translate that referenced this issue Jun 19, 2024
  * Ensure to clean up node after performing operation on the XML
  * Fix existing tests

See: WeblateOrg/weblate#11896
nijel pushed a commit to translate/translate that referenced this issue Jun 20, 2024
* Fix added spaces in XWikiPageProperties format XML output

  * Ensure to clean up node after performing operation on the XML
  * Fix existing tests

See: WeblateOrg/weblate#11896
@nijel nijel added the translate-toolkit Issues which need to be fixed in the translate-toolkit label Jun 20, 2024
Copy link

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
Copy link
Member

nijel commented Jun 20, 2024

I guess that fix in translate/translate#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).

@nijel nijel closed this as completed Jun 20, 2024
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.

@surli
Copy link
Contributor

surli commented Jun 20, 2024

I guess that fix in translate/translate#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
Copy link
Member

nijel commented Jun 20, 2024

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

nijel added a commit that referenced this issue Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken. translate-toolkit Issues which need to be fixed in the translate-toolkit
Projects
None yet
Development

No branches or pull requests

3 participants