Skip to content
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

Fixes #20215: Fix invalid translation count #20320

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

masterboy376
Copy link
Collaborator

@masterboy376 masterboy376 commented May 16, 2024

Overview

  1. This PR fixes or fixes part of Invalid translation counts in the ExplorationOpportunityModel #20215.
  2. This PR does the following: brings translation count in ExplorationOpportunity model and actual number of translations into sync with each other. Also here is before and after analysis of translation count Doc.
  3. (For bug-fixing PRs only) The original bug occurred because: Firstly, here in PR #16352 we were not removing the entity translations even after the content is removed while updating the exploration. Secondly, in this commit when reverting the exploration, we were not using the translations already submitted by the users for the version, we were reverting to and also, we were not updating the translation count in this case in ExplorationOpportunity model.

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar.
  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.
  • I have written tests for my code.
  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).

Proof that changes are correct

screen-recorder-fri-may-17-2024-09-38-56.webm

Proof of changes on desktop with slow/throttled network

screen-recorder-fri-may-17-2024-09-38-56.webm

Proof of changes on mobile phone

Proof of changes in Arabic language

PR Pointers

Copy link

oppiabot bot commented May 16, 2024

Hi @masterboy376 please assign the required reviewer(s) for this PR. Thanks!

@masterboy376 masterboy376 marked this pull request as ready for review May 17, 2024 17:16
@masterboy376 masterboy376 requested review from a team as code owners May 17, 2024 17:16
@masterboy376 masterboy376 marked this pull request as draft May 18, 2024 08:40
@masterboy376 masterboy376 marked this pull request as ready for review May 21, 2024 12:18
@masterboy376
Copy link
Collaborator Author

@vojtechjelinek , @chris7716 , @lkbhitesh07 PTAL

Copy link

oppiabot bot commented May 21, 2024

Unassigning @masterboy376 since a re-review was requested. @masterboy376, please make sure you have addressed all review comments. Thanks!

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Took a pass.

core/domain/translation_services.py Outdated Show resolved Hide resolved
core/domain/translation_services.py Outdated Show resolved Hide resolved
@@ -663,3 +652,47 @@ indexes:
- name: is_root_pipeline
- name: start_time
direction: desc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, interesting how many things are added here. Can you please check whether all these changes are expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am, after checking of them individually, I found that each of them is directly or indirectly related to the exploration related fields. Still, I feel like some of them are unnecessary. This file is generated automatically, right? So, if I delete the newly added line and perform reverting of an exploration on local dev server then lines which are absolutely necessary should be added again. Should I try this ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should work that way, please try it and see what happens.

Copy link

oppiabot bot commented May 28, 2024

Unassigning @vojtechjelinek since the review is done.

Copy link

oppiabot bot commented May 28, 2024

Hi @masterboy376, it looks like some changes were requested on this pull request by @vojtechjelinek. PTAL. Thanks!

@masterboy376
Copy link
Collaborator Author

@vojtechjelinek PTAL

Copy link

oppiabot bot commented May 30, 2024

Unassigning @masterboy376 since a re-review was requested. @masterboy376, please make sure you have addressed all review comments. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants