Skip to content

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The old suggested translations are not set as old

2 participants