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
Translations lost/overwritten without notification #6058
Comments
I think this can happen if on a component, you have activated (it's activated by default) Allow translation propagation. I have a lot of non wanted auto propagation translations and it's a pain in the ass. The lack of the merge maybe it's because the changes happens in the Age of changes to commit window |
Thanks for your hints, but translation propagation has been disabled, so that shouldn't have been the cause. Can I somehow see that in the logs whether the translation has been updated via translation propagation, to be sure that this isn't the issue? As mentioned above the "Age of changes to commit" was set to 2 hours. But even in case that time didn't fully pass yet and the changes therefore weren't committed yet Weblate should not (and normally does not) lose changes if it detects external changes and rebases its internal repo. |
The expected behaviour is that Weblate commits any pending changes before merging upstream changes (it looks at What could discard these changes is doing reset either via API or from the repository management page. I don't think this would be visible in the logs, but it would be visible in the component history. The other reason might a bug in the code - in case you see "disappeared string" entries in the log, that's an indication of that. |
If I understand that correctly, that means the changes should have been committed to the repository, which most likely did not happen (otherwise I would expect a hint about this in git reflog or in Weblate logs). So the question is why that didn't happen. No manual reset has been performed and there is no such entry in the component history. I didn't see any translation string being contained in the logs (so e.g. no occurrence of "Vlasný výber" or any other translation as far as I saw). If you mean "disappeared string" literally, I couldn't find that either, but unfortunately I don't have full logs anymore by now, so I can't tell for sure. |
The translation is first stored in the database only. It is committed later (see https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commits). I meant "disappeared string" literally, it would be followed by the source string. It is logged here: weblate/weblate/trans/models/translation.py Line 663 in 4760786
|
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! |
Describe the issue
Translation changes performed in the Weblate UI are visible in the history list in the Weblate-UI, but the translations have never been committed to the weblate repository (checked logs for "committing pending changes" and checked git reflog of repo in /app/data/vcs/... ). An external update vom VCS seems to have overwritten the changes (see logs below). Commit timeout was set to 2 hours.
I already tried
Describe the steps you tried to solve the problem yourself.
To Reproduce the issue
unfortunately I haven't been able to find out the steps to reproduce, but below are the events as seen in the logs and history view as they occured first. exactly the same issue occured again on the next day (translation changed in the morning, change lost at the end of the day).
at around 06:22 (UTC) translations for cs_CZ and sk_SK (structured JSON; de_AT is source) were changed:
at around 07:30 (UTC) older translation changes (de_DE and de_AT only) have been merged:
[2021-05-19 07:30:56,041: INFO/443] project/app-ui: repository updated from a7699fc558873447586cc0d3c4905fcb5bdb4b2a to 718c431cfaa16b4947c55d4da46e06217608ecf1
note that nothing changed, especially CZ/SK translations didn't, and still we get in the log:
[2021-05-19 07:30:56,687: INFO/443] project/app-ui/cs: processing server/src/main/resources/static/i18n/cs_CZ.json, content changed
I can't tell exactly when the CZ/SK changes were lost, because the neither the log nor the history view in weblate-UI contain an entry for the change - I assume that the sync from VCS above overwrote the change somehow.
Situation afterwards is that CZ/SK translation have their original values, as before the changes, but the history still shows the change. So that latest change as seen in the history doesn't match the actual translation.
Expected behavior
No changes get lost. In this specific case the Rebase should not have triggered any changes. In general changes should never be lost, but be merged or result in conflicts if merging isn't possible.
Server configuration and status
Weblate installation: openshift
Additional context
log excerpt, showing the update from external VCS
The text was updated successfully, but these errors were encountered: