Some glossary terms are saved twice to TBX causing translations to disappear
Describe the issue
There is no way to tell when this will happen. And I cannot trace who or what changes these. But happens in many languages at different times.
my translation is deleted today: https://hosted.weblate.org/translate/godot-engine/glossary/tr/?checksum=ed18aa2599356aed&q=+changed%3A%3E%3D2023-07-08&sort_by=source
a chinese one deleted3 days ago: https://hosted.weblate.org/translate/godot-engine/glossary/zh_Hans/?checksum=ed18aa2599356aed&q=+changed%3A%3E%3D2023-07-08&sort_by=source
As per a previous statement, I thought it could be a new addition to the English source, but there does not seem anything new there. besides, that should possibly be added as a duplicate.
I could only trace so far. I would say it might be related how translations propagates from components, but that does not tell anything about "deleting"
Please check the system and fix whatever causes the issue.
I already tried
- [X] I've read and searched the documentation.
- [X] I've searched for similar issues in this repository.
Steps to reproduce the behavior
Seeming randomly happening. Only clue for me is the "None" username
Expected behavior
No response
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
The problem seems caused by duplicate entries in the TBX file:
<termEntry>
<langSet xml:lang="en"><tig><term>Signals</term></tig></langSet>
<langSet xml:lang="tr"><tig><term/></tig></langSet>
</termEntry>
...
<termEntry>
<langSet xml:lang="en"><tig><term>Signals</term></tig></langSet>
<langSet xml:lang="tr"><tig><term>Sinyaller, İşaretler</term></tig></langSet>
</termEntry>
The question is how they appeared there.
The problem seems caused by duplicate entries in the TBX file:
That is also interesting because if I search for that word, I get only 1 result: https://hosted.weblate.org/browse/godot-engine/glossary/tr/?q=Signals&sort_by=-priority%2Cposition&checksum=
That's expected, but it should trigger the duplicate string alert instead. Seems like there is some bug in processing TBX files.
I have the exact opposite problem. Whenever I delete one of these three glossaries, the "None" user recovers it immediately :rofl:
- https://hosted.weblate.org/translate/godot-engine/glossary/zh_Hans/?checksum=74d5f3866906da0b
- https://hosted.weblate.org/translate/godot-engine/glossary/zh_Hans/?checksum=7d337a13ea32f347
- https://hosted.weblate.org/translate/godot-engine/glossary/zh_Hans/?checksum=320d0f7752d3f8b6
I've also had a few deleted/edited by this "None" user.
I can confirm that this is still a problem and not only occurs for adding or deleting a text, but also for editing. Is there any possible workaround until this is fixed?
Workaround is to fix the TBX files manually to remove duplicate entries.
Has anybody seen this issue recently? I still fail to reproduce it and in case we don't see it on recent releases, it might have been fixed by some other fix (like https://github.com/WeblateOrg/weblate/issues/10581).
Thank you for your report; the issue you have reported has just been fixed.
- In case you see a problem with the fix, please comment on this issue.
- 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.
Thanks, and sorry for not responding previously.
I am not able to test this fix for a few more weeks. Let's hope it is alright.
I marked the issue to test later, and will ask to reopen the issue if what I was experiencing is around.
I was able to reproduce the issue after deleting a glossary term in all languages (what deleted it from the database and not from the file, see https://github.com/WeblateOrg/weblate/issues/10403) and adding it again. There might have been other way to trigger this, so in case you can reproduce this, it would be great to know how.