Page MenuHomePhabricator

svgtranslate possibly erased translations
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • When updating the file translation page (or even when re-downloading a recently translated file from Commons) - The version of this file that is displayed is not the latest (outdated) one.
  • So, when adding a new translation and uploading it to Commons, another translation may get lost.
  • (maybe a caching issue?)

What happens?:
When adding a new translation and uploading it to Commons, another translation may get lost.

What should have happened instead?:
The current version of the file from Commons should always be loaded and displayed on the translation page.
(Perhaps should at least improve the description at https://commons.wikimedia.org/wiki/Commons:SVG_Translate_tool)

Software version:
svgtranslate 2.1.0

Other information (browser name/version, screenshots, etc.):
Translated file: https://commons.wikimedia.org/wiki/File:Antwerpen_Eingemeindungen.svg
Firefox 152.0.3 Win10x64

Possibly related:
T245356 T213126

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Delete cached file on initial page loadtoolforge-repos/svgtranslate!15samwilsondelete-when-loadingmain
Customize query in GitLab

Event Timeline

Which file did this happen with? Did you catch it before uploading a new version?

Which file did this happen with? Did you catch it before uploading a new version?

Translated file: https://commons.wikimedia.org/wiki/File:Antwerpen_Eingemeindungen.svg
(After noticing the problem and refreshing the file translation page several times, I managed to display the latest version of the file (I also had to revert the previous version of the file to Commons to restore the deleted translation))

Did you catch it before uploading a new version?

Before uploading a new version of a file, you can assume that the version of the file being displayed is not the latest (outdated) version (File translation page does not reflect all the translations contained in the latest version of the file. But perhaps it reflects both the translations from the file and the cached other translations from the tool page?) However, this only becomes apparent when adding a new translation and uploading it to Commons may result in the loss of another translations.

I also created a possibly related Request to improve the description on Talk page of Commons:SVG Translate tool:

  1. It's also not entirely clear whether it's possible to switch between languages ​​to create multiple translations at once, or whether each individual translation needs to be uploaded to Commons (since switching languages ​​often results in a message saying there are unsaved translations (even if these are translations loaded from a file and haven't been edited yet - this is inconsistent behavior?)).

(https://commons.wikimedia.org/wiki/Commons_talk:SVG_Translate_tool#Request_to_improve_the_description)

switching languages ​​often results in a message saying there are unsaved translations (even if these are translations loaded from a file and haven't been edited yet - this is inconsistent behavior?)

That does sound like a bug. It should only show the unsaved prompt if you've made changes. I've opened T430917: Unsaved warning is shown when no edits are made.

As far as the cache bug goes, I've not been able to replicate it. The cache lifetime is 5 minutes, and the cached file is supposed to be deleted when you upload to Commons. Are you seeing this happen only when less than 5 minutes have elapsed?

... As far as the cache bug goes, I've not been able to replicate it. The cache lifetime is 5 minutes, and the cached file is supposed to be deleted when you upload to Commons. Are you seeing this happen only when less than 5 minutes have elapsed?

(I just assumed there might be a caching issue here.)

As I wrote in the answer

... (After noticing the problem and refreshing the file translation page several times, I managed to display the latest version of the file (I also had to revert the previous version of the file to Commons to restore the deleted translation))

— Yes, it looks like: after ~5 minutes and refreshing the file translation page, I managed to display the latest version of the file.

Also, note that 1. Updating the file translation page, and 2. Re-downloading a recently translated file from Commons, — are different use cases (starting points), but I didn't create separate tasks because I didn't reproduce them separately...

Samwilson removed a project: Patch-For-Review.

T213126 has more history about the caching issues.

I think the fix here is to refresh the cache whenever someone opens a File page in the tool, as I've got it now in MR 15 above. That will slow things done a bit, but overall be better I think.

Released in 2.2.0.