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

Leading spaces in source/translation strings #6022

Closed
1 task done
Krzmbrzl opened this issue May 16, 2021 · 6 comments
Closed
1 task done

Leading spaces in source/translation strings #6022

Krzmbrzl opened this issue May 16, 2021 · 6 comments
Labels
question This is more a question for the support than an issue.

Comments

@Krzmbrzl
Copy link

Krzmbrzl commented May 16, 2021

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

  • I've read and searched the docs and did not find the answer there.
    If you didn’t 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 mumble-voip/mumble#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?

@Krzmbrzl Krzmbrzl added the question This is more a question for the support than an issue. label May 16, 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!

@Krzmbrzl
Copy link
Author

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

@deluxghost
Copy link

deluxghost commented May 17, 2021

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.

nijel added a commit that referenced this issue May 17, 2021
It was broken since changing the highlighter code...

See #6022
@nijel
Copy link
Member

nijel commented May 17, 2021

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 a090d32.

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.

@Krzmbrzl
Copy link
Author

Thank you very much 👍

@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s 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’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
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

3 participants