oppia / oppia

A free, online learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
5.63k stars 3.78k forks source link

Invalid translation counts in the ExplorationOpportunityModel #20215

Open chris7716 opened 2 weeks ago

chris7716 commented 2 weeks ago

Steps to reproduce

  1. Steps to reproduce(in dev server)
  2. Submit translations for all cards of “Finding the value of a number” lesson
  3. Accept all translation suggestions for that lesson
  4. Change the second card of the lesson. Change the interaction to multiple choice and add three choices.
  5. Add one correct interaction
  6. Add two hints
  7. Publish the lesson
  8. Translate all the available cards for the lesson “Finding the value of a number” except one hint.
  9. Accept all the submitted cards
  10. Now go back to the lesson and revert the version back to the 2nd version of the lesson.
  11. Now go back to the CD “Translate Text” tab.
  12. You will see all the cards of the lesson again to translate.
  13. Add translations to them
  14. Now try to accept those translations
  15. You will get the error for invalid translations count.

This might be happening since we do not create new version of EntityTranslationModel when we reverting an exploration.

This needs to be fixed because, if not, translators will occasionally run into this error and it will block all translation progress

316251586-a2714468-c66b-4849-b7e8-2127bfbcf669

Related: https://github.com/oppia/oppia/issues/20033

masterboy376 commented 1 week ago

Hello @chris7716, is this reproducible in local serve.

masterboy376 commented 5 days ago

Hello @chris7716 , successfully reproduced on the local machine. I also found out that the modal to mark translation as stale was only popping up when we were updating an existing content with previous translation and not when we delete any existing content. Screenshot (156) Screenshot (157) Screenshot (155) Also, is it the same issue for which you were writing a regeneration job.