Loading
Bug 1967792 - Do not re-translate translated attributes r=translations-reviewers,gregtatum
This patch fixes an edge case where the page itself may replace an attribute with content that has already been translated. This would previously cause the TranslationsDocument to translate the text a second time, which, depending on the model, may reduce the quality of the translation. This is a common occurrence on Wikipedia, which will delete the "title" attributes on `<a>` elements when moused over, and replace them when the curor leaves. The caching mechanism is now updated such that we will not re-translate text that we know to be the output of a recent translation. This does not, however, guard against the page inserting new text that happens to be in the target language, which was not the previous result of a translation request. Differential Revision: https://phabricator.services.mozilla.com/D249978