Repository navigation
Preserve warnings when loading translations - #3951
Conversation
Previously, we were indiscriminately reseting failed checks every time the editor result changed, including at the initial load of a translation. This fix checks whether the current editor content differs from the initial loaded content before clearing the warnings.
|
Thanks for the patch, @MundiaNderi!
Do you want me to hold off the review until these inconsistencies are resolved? |
Yes please hold off the review |
I looked at the inconsistencies and they appear to be intentional. The cl and p checks are stored in the database and shown to everyone, but tt checks aren't saved: https://github.com/mozilla/pontoon/blob/main/pontoon/checks/__init__.py On first submission, it shows 4 warnings - 1 cl warning and 3 tt warnings. When you bring the translated string back into the editor, only the cl warning shows. The tt warnings are computed fresh on each submission based on Line 787 in c0c535c When loading a saved translation, tt warnings are never recalculated until you fix the cl warnings and try to submit again. That's when the tt failed checks reappear:
|
|
Ah, sorry for not looking into your comment more deeply - yes, that's the expected behaviour. |
Previously, we were indiscriminately reseting failed checks every time the editor result changed, including at the initial load of a translation. This fix checks whether the current editor content differs from the initial loaded content before clearing the warnings.


Fixes #3625
Previously, we were indiscriminately reseting failed checks every time the editor result changed, including at the initial load of a translation.
This fix checks whether the current editor content differs from the initial loaded content before clearing the warnings.
To test this issue:
Previews