Page MenuHomePhabricator

Preserve in-progress translations if user logs in or navigates away after adding translations
Closed, ResolvedPublic5 Estimated Story Points

Description

User story

  1. As a user, I would like to land back on the translation page with my added translations intact after login.
  2. As a user, I would like to have my in-progress translations preserved temporarily in case my browser/computer crashes.

Combining these two user stories as they seem related.

Requirements

  • If a user is on the Translate page and they click Login after adding translations, their translations should be preserved and the user should land back on the same page after they complete the login.
  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

Event Timeline

Niharika triaged this task as Medium priority.Jan 7 2019, 6:37 AM
Niharika created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika set the point value for this task to 3.Jan 9 2019, 12:14 AM
Niharika moved this task from Needs Discussion to Up Next (June 3-21) on the Community-Tech board.

the user should land back on the same page after they complete the login.

This part is ready for review: https://github.com/wikimedia/svgtranslate/pull/71

In case they had multiple in-progress translations, preserve translations for all of those.

Does this include switching to and from other To languages (i.e. without reloading the page)? I've been assuming it does, but that may be wrong (I think we did talk about not doing that a while ago).

the user should land back on the same page after they complete the login.

This part is ready for review: https://github.com/wikimedia/svgtranslate/pull/71

In case they had multiple in-progress translations, preserve translations for all of those.

Does this include switching to and from other To languages (i.e. without reloading the page)? I've been assuming it does, but that may be wrong (I think we did talk about not doing that a while ago).

@Samwilson I meant if they had multiple tabs open with the tool and were in the process of translating multiple files. Switching between multiple To languages should not preserve translations. We should discard existing translations when they decide to change the language (which is what we have the popup for).
Is this clearer?

I meant if they had multiple tabs open with the tool and were in the process of translating multiple files. Switching between multiple To languages should not preserve translations. We should discard existing translations when they decide to change the language (which is what we have the popup for).
Is this clearer?

Yep! That makes sense. Thanks.

Niharika changed the point value for this task from 3 to 5.Feb 21 2019, 12:29 AM

I was too hasty above with "rest of this"... but a chunk more has been done and is ready for QA: the From and To languages should be correctly remembered when you login or close the window.

I'd like to get this part QA'd (it's now live on the staging site) before going on with the message form inputs themselves, in case there's some structural problem.

@Samwilson This works well for me. The languages seem to be correctly remembered as they should.
Let's get the rest of this done.

Samwilson moved this task from In Development to Ready on the Community-Tech-Sprint board.
Samwilson subscribed.

I did a rudimentary test on this and it seems to work fine.

Requirements

  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

It is my understanding that the tool only stores partial translations for one file/tab at a time, the one you have most recently worked on. If you have multiple translations in progress, closing or navigating away (incl. logging in) from a tab you have not recently used will lose your unsaved translation.

We may need to recommend users not translate more than one file at a time, or use different browsers for each file.

EDIT: In fact, the local storage is shared across tabs, so if you have two translations on the go you may find translations you do on one tab appearing in the other (if you, for example, refresh the page). Or, if you translate one image after another, the translations for the previous image can appear in the current image.

Requirements

  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

It is my understanding that the tool only stores partial translations for one file/tab at a time, the one you have most recently worked on. If you have multiple translations in progress, closing or navigating away (incl. logging in) from a tab you have not recently used will lose your unsaved translation.

We may need to recommend users not translate more than one file at a time, or use different browsers for each file.

Gotcha. I can live with only being able to have one translation in progress at a time. I will add that to the documentation.

@dom_walden Dropping this in the QA column for you in case there's any further QA work you want to do here. :) Thank you!

Commits linked to this task have been released in svgtranslate 0.9.0.

@dom_walden Dropping this in the QA column for you in case there's any further QA work you want to do here. :) Thank you!

I have nothing else to add. I raised bug T223380 for:

...if you translate one image after another, the translations for the previous image can appear in the current image.

as that affects users who are translating one image after another.

Niharika moved this task from Product sign-off to Done on the Community-Tech-Sprint board.

Thanks Dom!