Santhosh has uploaded a new change for review. ( 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/99/378199/1 diff --git a/modules/dm/mw.cx.dm.Translation.js b/modules/dm/mw.cx.dm.Translation.js index 36c9cbf..774b86f 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|undefined} The translation unit + */ +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: newchange Gerrit-Change-Id: I28fcd0b7885b333c5cfbce6946f3fe04133ce3f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits