Page MenuHomePhabricator

CX2: "Too much unmodified content" warning issues
Closed, ResolvedPublic

Description

It's the follow-up ticket for T190283: CX2: Prevent publishing translations with too much unmodified content.

(1) When no MT option is used, the warning nevertheless appears along with the blank issues summary card.

  • Start translation and do not use any MT options - set 'Do not use machine translation" as default.
  • Click on 'Add translation' for several paragraphs/sections, but do not add anything - so the sections are blank.
  • Try to 'Publish' - the warning appears: "Your translation cannot be published because it contains too much unmodified machine-translated text".

The same warning will be for 'Use source article' option:

Screen Shot 2018-08-20 at 3.45.50 PM.png (678×1 px, 248 KB)

Multiple Console errors are displayed:

Uncaught TypeError: Cannot read property 'id' of undefined
   at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.focusCurrentElement (<anonymous>:906:40)
   at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.onViewDetails (<anonymous>:905:725)
   at OoUiButtonWidget.oo.EventEmitter.emit (<anonymous>:64:486)
   at OoUiButtonWidget.OO.ui.mixin.ButtonElement.onClick (load.php?debug=false&lang=en&modules=ext.visualEditor.core|jquery%2Coojs-ui-core&skin=vector&version=1a1pe1w:981)
   at HTMLAnchorElement.dispatch (load.php?debug=false&lang=en&modules=ext.visualEditor.core|jquery%2Coojs-ui-core&skin=vector&version=1a1pe1w:875)
   at HTMLAnchorElement.elemData.handle (load.php?debug=false&lang=en&modules=ext.visualEditor.core|jquery%2Coojs-ui-core&skin=vector&version=1a1pe1w:872)

(2) The threshold in cx2 for "too much unmodified content" seems to be below 50% - the article cannot be published.

Event Timeline

Change 454227 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Fix validation condition

https://gerrit.wikimedia.org/r/454227

Petar.petkovic triaged this task as High priority.

In 454227, I'm fixing the empty issue card.
Other problems described here and in T190283#4517107 should be dealt with separately.

Note for testing after the fix is merged - check also T202342 for some useful test cases.

Note for testing after the fix is merged - check also T202342 for some useful test cases.

This is recursion :)

Change 454227 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix validation condition

https://gerrit.wikimedia.org/r/454227

Note for testing after the fix is merged - check also T202342 for some useful test cases.

This is recursion :)

Yes, indeed :) I meant to add it to a different ticket - T190283: CX2: Prevent publishing translations with too much unmodified content

Etonkovidova added a subscriber: Pginer-WMF.
  • The Console errors are gone.
  • The summary issue card is not empty - it lists warnings for 'too much unmodified' text even when source and no-machine translation options were used (which is a problem mentioned by @Pginer-WMF in T190283
no machine translation optionsource option
Screen Shot 2018-09-02 at 4.58.00 PM.png (455×1 px, 99 KB)
Screen Shot 2018-09-02 at 6.01.28 PM.png (477×1 px, 170 KB)

The other issues (see below) that outside of the scope of this ticket, I've added to T190283:

  • the specific warning for publishing blank translation
  • the state of 'Publish' button when the summary issue card has not-resolved issues
  • the thresholds for unmodified (blank) content for preventing publishing translation