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

Set as old the previous translations with waiting status for this user #1536

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

amieiro
Copy link
Member

@amieiro amieiro commented Nov 29, 2022

What?

When a translator suggests more than 1 translation for the same original, the previous ones maintain the waiting status. I think we should set the previous translations as old, because the new suggestion has improved the previous ones.

Fixes #1498.

Why?

When the same user adds a new suggestion for the same original, I think the new suggestion is an improvement to the previous ones, so it doesn't make sense to have the old translations in waiting status. The best approach is to change the previous translations' status to old. If the translator is using this as a communication platform with the validator, she has the feedback tool to do this at https://translate.wordpress.org/, and soon she will have the same tool in the GlotPress core (currently, in the gp-translation-helpers) plugin.

How?

When the new suggestion is stored with the waiting status, the previous translations for the same original, the same translation set (project and language), the same translator and in waiting status are set to old.

Testing Instructions

I have added 2 tests. If you want to test it manually, you need:

  1. Suggest a translation (T1) to an original.
  2. Suggest a different translation (T2) for the same original.
  3. Review the history for this original and see that the first translation (T1) is in old status and the new translation (T2) is in waiting status.
  4. After adding T1, with another user (e.g. in another browser), you can add a different translation (T2) for the same original and when you add T3, you can see T1 in old status and T2 and T3 in waiting status.

Screenshots or screencast

The previous translations for the user1 has been set as old. It doesn't affect the user2' translations.

image

@amieiro amieiro marked this pull request as ready for review November 29, 2022 18:17
Copy link
Member

@akirk akirk left a comment

Choose a reason for hiding this comment

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

Looks good to me and tests work well.

@amieiro amieiro enabled auto-merge (squash) March 8, 2023 13:43
@amieiro amieiro merged commit 82d29e3 into GlotPress:develop Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants