Weblate: Leading spaces in source/translation strings

Created on 16 May 2021  路  6Comments  路  Source: WeblateOrg/weblate

Describe the issue
When having a source String like > test (note the multiple leading spaces - the ">" is only predent to prevent GitHub from eating the spaces), Weblate seems to squash them into a single one.
Furthermore when trying to add leading space to a translation whose source String does not have any, Weblate always "auto-fixes" the translation by removing the leading space.

I already tried

  • [x] I've read and searched the docs and did not find the answer there.
    If you didn鈥檛 try already, try to search there what you wrote above.

Server configuration and status

Weblate installation: Hosted Weblate
https://hosted.weblate.org/projects/mumble/mumble-client/

Additional context

This issue was reported to us in https://github.com/mumble-voip/mumble/discussions/5001 (also contains examples)

Actual Question
Is there a setting that we can use to change this behavior? Or some other workaround to make this work?

question

All 6 comments

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!

Note that the issue about the leading spaces in source Strings has been resolved. These are only displayed as if there was only a singke space. In truth all spaces are preserved though

Note that the issue about the leading spaces in source Strings has been resolved. These are only displayed as if there was only a singke space. In truth all spaces are preserved though

I think the "displaying" itself is indeed still an issue. A translator may not aware there are multiple spaces unless they click any of the copy button, and leave a wrong translation with only one space. For the example in mumble client, I know there are more spaces only because I know there were more before we migrated to weblate.

Please keep it one topic per issue, having two of them here, and discussing whether one of them is actually and issue or not, does not help in tracking the state of this issue...

The highlighting of whitespace indeed is broken for some time, I've just fixed it in a090d321d88a32373386c66d58898ea7271d2fa8.

The autofixer behaviour can be adjusted using ignore-begin-space and ignore-end-space flags, see https://docs.weblate.org/en/latest/admin/checks.html#customizing-behavior-using-flags.

Thank you very much :+1:

The issue you have reported is now resolved. If you don鈥檛 feel it鈥檚 right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don鈥檛 hesitate to support Weblate by making a donation.
Was this page helpful?
0 / 5 - 0 ratings