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

Update an existing string's translators explanation from a translators-comment from its source POT-file #8260

Closed
2 tasks done
SantosSi opened this issue Oct 23, 2022 · 7 comments
Labels
question This is more a question for the support than an issue.

Comments

@SantosSi
Copy link
Contributor

Describe the issue

When adding a comment for translators in the source POT file as described in the PO file docu, that comment is not used for that string's translator explanation.
POT files are configured and used, as they are successfully read when adding a language.

I already tried

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

Steps to reproduce the behavior

  1. Add a translators-comment (line starts with a # ) for a string in the source POT file
  2. Commit to the repo
  3. Make sure the file change was detected by Weblate
  4. Check the explanation for the same string in Weblate

Expected behavior

The translators-comment appears as a string explanation in Weblate.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@SantosSi SantosSi added the question This is more a question for the support than an issue. label Oct 23, 2022
@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!

@SantosSi SantosSi changed the title How to update an existing string's translators explanation from a translators-comment from its source POT-file? Update an existing string's translators explanation from a translators-comment from its source POT-file Oct 23, 2022
@nijel
Copy link
Member

nijel commented Oct 24, 2022

The explanation is only stored and managed in Weblate. Comments from the file are displayed as "Source string description", see https://hosted.weblate.org/translate/weblate/application/cs/?checksum=39b3998dcfe68cbf for this:

#. Translators: Shown on wrong answer to the mathematics-based CAPTCHA
#: weblate/accounts/forms.py:495
msgid "That was not correct, please try again."
msgstr "To nebylo správně, zkuste to prosím znovu."

@SantosSi
Copy link
Contributor Author

SantosSi commented Oct 24, 2022

Thanks, Michal, for the explanation. That was mainly my misunderstanding: I mistook the translator-comments as comments FOR translators.
FYI, your suggestion worked like a charm, thanks again: https://hosted.weblate.org/translate/ospo-zone-ggi/52_activity_22/pt/?checksum=141056b27c966a18

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

@SantosSi
Copy link
Contributor Author

SantosSi commented Nov 8, 2022

Running into an incompatibility with md2po, which does not keep #. comments intact, as it regards only # comments as comments FOR the translator (like I did above). The dilemma of this incompatibility between Weblate and mdpo is that

  • either comments for the translator are in #: Weblate does not show them to the translator, but kept intact by md2po runs
  • or comments for the translator are in #.: Weblate shows them to the translator, but are removed by md2po runs.

See my issue comment there. I would love to see you communicate directly, making both tools compatible.

@nijel
Copy link
Member

nijel commented Nov 8, 2022

See https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html:

  • #. is comment extracted from the source intended for translators, Weblate displays those
  • # is comment provided by translators, Weblate ignores those

The md2po behavior is somewhat expected. I assume it creates POT file from Markdown (which contains no comments) and then calls msgmerge to update PO file. It keeps the translator comments, but overrides the extracted comments based on the POT file.

@SantosSi
Copy link
Contributor Author

SantosSi commented Nov 9, 2022

That's probably the way it works.
And I've found a way to keep the #. comments in md2po by using the short paramaters -s -p instead of their long equivalents.
Thanks for your comments, Michal.

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