-
-
Notifications
You must be signed in to change notification settings - Fork 958
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 comments are not analyzed when source file is uploaded again #5757
Comments
The flags change should be detected. Was the translation file (PO) updated? Does it contain the flag? |
no, not the .po files. I just updated the .pot file and expected that changes there would propagate to all languages. I can check again on monday, but IIRC the source language (en) didn't contain the flag after the .pot was updated. |
The po files should be updated on such upload. I'm trying to figure out which part is broken |
Hi Nijel, Short version: it works as expected with the attached MRE. In the hope that it will be useful to create a test case, I attach my example Example.zip contains three strings where c-format is turned on/off.
This is a very small example. The only thing that I can imagine right now is that under the hood weblate wasn't finished yet with parsing the uploaded .pot file (200k real data), although it said so on the "insights" page. But it should have been a few minutes after the upload, because I checked for the c-format tag several times. |
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
The API for tasks is documented here: https://docs.weblate.org/en/latest/api.html#tasks |
The problem is that there is absolutely no hint where the uuid comes from. This is the only place where the term 'uuid' appears in the docs, so it's a well kept secret. |
You get the full API URL in |
So if I understand that correctly, after any action that I wish to (or need to) monitor I have to requeste |
IMHO it should be already present. |
Meanwhile the subject of this issue has drifted a bit :) |
How I discovered the problem:
I've uploaded a bunch of .po files and one .pot template via API as a .zip file to our weblate instance. Later I noticed that our .pot extractor has missed some
c-format
msgids. So I fixed the .pot extractor and uploaded the .pot file again.API used:
I chose 'method ': 'source', because I wanted Weblate to update the existing translations. So the .pot files are identical apart from a handful of extra
c-format
comments in the second upload.Example
Upload 1:
Upload 2:
The msgid "%d items selected" did not receive the
c-format
tag after the second upload.My theory: The comments are not analyzed again, when the .pot file is re-uploaded.
I already tried
When I delete the component and re-create it from the .pot file with the
c-format
comments, the msgids receive thec-format
tag as expected. So the parsing itsel works correctly on the initial upload.To Reproduce the issue
Steps to reproduce the behavior:
Everything was done via the API, but can probably be done the same way via the UI
c-format
commentsc-format
comment for the same stringExpected behavior
That the
c-format
tag can be turned on/off on translation strings by uploading a .po(t) file with/withoutc-format
comments.Server configuration and status
Weblate installation: Weblate 4.5.1 on Docker
The text was updated successfully, but these errors were encountered: