KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/220436
Change subject: Enable publish button when the preference is not to use initial translation ...................................................................... Enable publish button when the preference is not to use initial translation The translation weight was taken using $.data, which does not reflect the updated values. If there is no initial translation, the initial value is 0 and causing progress calculation understands it as 0 translation permanently. Changed the translation weight reading to .attr method and fixed the issue. Testplan: Choose a translation where the direction of source and target differs. page=גבעת+יערים&from=he&to=en is an example. Click on some sections and start typing in the blank translation sections You should notice the publish button enabled. Bug: T103555 Change-Id: I1ec868e270fa65485fa8e21268f8e46a163e9178 (cherry picked from commit 0e4d027dd03a746735bba8d94552547506e1707e) --- M modules/translation/ext.cx.translation.progress.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/36/220436/1 diff --git a/modules/translation/ext.cx.translation.progress.js b/modules/translation/ext.cx.translation.progress.js index 7fe2c07..dc8e804 100644 --- a/modules/translation/ext.cx.translation.progress.js +++ b/modules/translation/ext.cx.translation.progress.js @@ -88,7 +88,7 @@ $sections.each( function () { var weight, state, $section = $( this ); - weight = $section.data( 'cx-weight' ); + weight = $section.attr( 'data-cx-weight' ); weights.any += weight; state = $section.data( 'cx-state' ); -- To view, visit https://gerrit.wikimedia.org/r/220436 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ec868e270fa65485fa8e21268f8e46a163e9178 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: wmf/1.26wmf10 Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits