Set as old the previous translations with waiting status for this user #1536
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
When a translator suggests more than 1 translation for the same original, the previous ones maintain the
waitingstatus. I think we should set the previous translations asold, 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
waitingstatus. The best approach is to change the previous translations' status toold. 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
waitingstatus, the previous translations for the same original, the same translation set (project and language), the same translator and inwaitingstatus are set toold.Testing Instructions
I have added 2 tests. If you want to test it manually, you need:
oldstatus and the new translation (T2) is inwaitingstatus.oldstatus and T2 and T3 inwaitingstatus.Screenshots or screencast
The previous translations for the
user1has been set asold. It doesn't affect the user2' translations.