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

gettext error for translations that do not also end with \n (or have a newline when they should not) #8966

Closed
smoe opened this issue Mar 22, 2023 · 3 comments
Labels
question This is more a question for the support than an issue.

Comments

@smoe
Copy link

smoe commented Mar 22, 2023

BAJ kindly requested to transform a customer care ticket to a GitHub issue:

Hello,
When the original was initially correctly translated with a terminal \n but in a revision loses that, then the translation needs to be updated accordingly. Just that small reddish square at the end is easily overlooked and then we get errors like these:

po/gmoccapy/tr.po:416: 'msgid' and 'msgstr' entries do not both end with '\n'
po/gmoccapy/tr.po:420: 'msgid' and 'msgstr' entries do not both end with '\n'
po/gmoccapy/tr.po:545: 'msgid' and 'msgstr' entries do not both end with '\n'
po/gmoccapy/tr.po:588: 'msgid' and 'msgstr' entries do not both end with '\n'

This happens more easily and more frequently than one may think. To spot the entry causing the trouble, one needs to check that file and then search for the text in weblate. Could you instead please find these instances and have these forced as fuzzy?

Just a comment since this was not clear to the other admins of our project (LinuxCNC): This error is related but not identical to the "number of lines not matching" check. Also, a different number of lines would be tolerated by gettext, but this one is not.

Many thanks!

@nijel
Copy link
Member

nijel commented Mar 22, 2023

  • Such a string would fail the “Trailing newline” check, if you would not add ignore-end-newline flag to a component configuration.
  • When having the check in place, you can also make it enforced via https://docs.weblate.org/en/latest/admin/projects.html#enforced-checks. It will then make failing strings fuzzy.
  • This string would be automatically fixed by Weblate when editing if you would not turn that off via ignore-end-space flag.

@nijel nijel added the question This is more a question for the support than an issue. label Mar 22, 2023
nijel added a commit that referenced this issue Mar 22, 2023
It turns out that the documentation was missing.

Issue #8966
@smoe smoe closed this as completed Mar 22, 2023
@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!

@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

2 participants