jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378199 )
Change subject: Fix the js error while loading a translation with saved translation ...................................................................... Fix the js error while loading a translation with saved translation This will not make the restore-translation feature working. Just prevents the js error that prevents loading the source article to translation view. Change-Id: I28fcd0b7885b333c5cfbce6946f3fe04133ce3f9 --- M modules/dm/mw.cx.dm.Translation.js M modules/mw.cx.TranslationController.js 2 files changed, 10 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/modules/dm/mw.cx.dm.Translation.js b/modules/dm/mw.cx.dm.Translation.js index 36c9cbf..4f1e176 100644 --- a/modules/dm/mw.cx.dm.Translation.js +++ b/modules/dm/mw.cx.dm.Translation.js @@ -281,6 +281,15 @@ return this.translationUnitById[ id ]; }; +/** + * Get a translation units + * + * @return {mw.cx.dm.TranslationUnit[]} The translation units + */ +mw.cx.dm.Translation.prototype.getTranslationUnits = function () { + return this.topTranslationUnits; +}; + mw.cx.dm.Translation.prototype.getProgress = function () { return this.progress; }; diff --git a/modules/mw.cx.TranslationController.js b/modules/mw.cx.TranslationController.js index c5fb722..45e8023 100644 --- a/modules/mw.cx.TranslationController.js +++ b/modules/mw.cx.TranslationController.js @@ -292,7 +292,7 @@ this.translation.getTranslationUnits().forEach( function ( unit ) { var savedSection, provider, document, - sectionId = unit.getSectionId(); + sectionId = unit.getId(); if ( !savedUnits[ sectionId ] ) { return; -- To view, visit https://gerrit.wikimedia.org/r/378199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28fcd0b7885b333c5cfbce6946f3fe04133ce3f9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits