Page MenuHomePhabricator

Starting a new translation is loading contents from a previously deleted one
Closed, ResolvedPublic

Description

Trying to start from scratch a translation shows the contents of a previous translation draft that was saved before.

This happened when translating "Nasothek" from English to Spanish in the CX2 test server for the user "Pau". Later I could reproduce the same issue for "Paneer", by publishing a translation, deleting it and starting another one.

We may want to investigate what went wrong and make our process for saving/deleting/restoring more solid.

The issue is captured below:

Apr-12-2018 11-58-45.gif (474×640 px, 3 MB)


Additional actions:

Event Timeline

@Pginer-WMF A possible scenario:

  1. You published it once
  2. Did some changes later and now status is draft
  3. Deleted that translation from dashboard
  4. Used the same language pair and title for starting from scratch. Used CX Source selector.
  5. Translation loads with your old translated content

This was intentional as per T123902: If the translation in progress was once published, deleting it should move it to published status
Please confirm whether the case you pointed out is matching with this or not
Or should we revisit T123902

This was intentional as per T123902: If the translation in progress was once published, deleting it should move it to published status
Please confirm whether the case you pointed out is matching with this or not
Or should we revisit T123902

It matches the scenario, and it may need some adjustments. In the scenario you described (using the "new translation" button), I'd expect to start with a fresh translation.

That should be compatible with the following behaviour that we want to keep:

  • When removing an in-progress translation that you published, it should still remain in the published list.
  • From the published list, clicking on the pencil icon ("continue translation"), will continue the existing translation draft.

@Pginer-WMF Our data model does not support this. There can only be one draft per (user, source title, source language, target language) in the data model. If you want to allow translating a published draft again from scratch, we would need to throw the old draft away from the database and translation memory dumps or make changes to our data model.

@Pginer-WMF Our data model does not support this...

Thanks for the details @Nikerabbit. Given the added complexity, I think we can move this ticket to the general backlog, and focus on other tickets more central to the new translation editor for now. I think it makes sense to reconsider this ticket when we plan for the work on allowing multiple users to work on the same translation (T86151) which may also require changes in our data model.

Can we have a way to delete old drafts?

I think I have the solution, this only affects articles created with Content Translation v.1, but not with articles created with Content Translation v.2. Apparently the first software interferes with the second, causing this entanglement.

What is current status? Anyone has at least a walkaround for this problem?

For now the workaround is to copy the contents of the original article into a sub-page and translate that one. For example you can select the edit source article and copy the wikitext to the clipboard. Then create a page as a sub-page of your user page and paste those contents.

We have a pending revision of the data schemas to overcome some of the current limitations of the tool (users translating the same article and this issue). This is not a trivial process to keep backwards compatibility, as we plan to have more room for maintenance of Content Translation in the upcoming months we'll consider this as one of the potential areas of maintenance.

The source language, target language, source title, translator is defined as unique in our datamodel and database. The record can go between any of the draft, published, deleted status.

Allowing a fresh record with the same values of these parameters but without saved content would involve hard deletion of content that was saved earlier in corpus table(And this data is already there in dumps published)

We may also want to see if there is any issue with restoring old translation? A translator can always reuse or start the translation of that section from scratch right? It may even save some time by reusing older work?

Allowing a fresh record with the same values of these parameters but without saved content would involve hard deletion of content that was saved earlier in corpus table(And this data is already there in dumps published)

I guess that this problem would occur when the translation is restarted either by the system (as proposed) or manually (by the user cleaning the paragraphs, as you mentioned). So automating this process would make not much difference.

We may also want to see if there is any issue with restoring old translation? A translator can always reuse or start the translation of that section from scratch right? It may even save some time by reusing older work?

When the user starts a new translation for an article that is not in-progress, the expectation is for a clean start.
Providing that would save users from the confusion of getting an unexpected result and the steps needed to clean it manually.
Previous comments (T192065#7153249) compile links to talk page messages where this issue has been reported by users with additional context.

This issue was mentioned by a user in this comment:

Problem is, there is absolutely no way to "restart the translation" and I don't see any buttons whatsoever for doing so.. Even if I switch to "published translations" tab and delete the item, and start a new translation, it always loads the old content no matter what. The only solution I have found so far is to use a second account to load the new content and start a new translation but I don't think that is an optimal way to go... Is there anything I can do to fix this?

This issue was mentioned by a user in this comment:

I once completed translating one page in the past, and now I want to translate some sections of the current version, but the editor constantly load an empty “saved” draft with old-version original article that I can't get away with. There‘s no entry to delete in my “ongoing” translation section and no delete button in the “completed” section.

Based on the following screencast, this issue seems to be resolved. @Pginer-WMF do you think we can close this task as done?

Pginer-WMF claimed this task.

Based on the following screencast, this issue seems to be resolved. @Pginer-WMF do you think we can close this task as done?

Great! This is a long requested improvement that is great to see resolved. Thanks!!