Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374526 )
Change subject: Reference: Remove wrapping of reference body ...................................................................... Reference: Remove wrapping of reference body Change-Id: I5c1e60176b54095773c429c8e47c9c923552e2a1 --- M lib/translationunits/MWReference.js 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/26/374526/1 diff --git a/lib/translationunits/MWReference.js b/lib/translationunits/MWReference.js index ff0294c..d7d7b9c 100644 --- a/lib/translationunits/MWReference.js +++ b/lib/translationunits/MWReference.js @@ -14,7 +14,7 @@ class MWReference extends TranslationUnit {} MWReference.prototype.adapt = cxutil.async( function* () { - let refData, refBody, wrappedRefBody, translatedRefBody, unwrappedTranslatedRefBody; + let refData, refBody, translatedRefBody, unwrappedTranslatedRefBody; // TODO: This format is not decided yet. We do need to inform client about failed // adaptations somehow. @@ -41,12 +41,10 @@ return this.node; } - // MTClient only accepts content wrapped in block element tags in HTML mode. - wrappedRefBody = '<div>' + refBody + '</div>'; // TODO: Parse recursively instead of just MTing to handle templates // Translate reference contents translatedRefBody = yield this.context.conf.mtClient.translate( - this.sourceLanguage, this.targetLanguage, wrappedRefBody + this.sourceLanguage, this.targetLanguage, refBody ); unwrappedTranslatedRefBody = translatedRefBody.replace( /^<div>(.*)<\/div>$/, '$1' ); -- To view, visit https://gerrit.wikimedia.org/r/374526 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c1e60176b54095773c429c8e47c9c923552e2a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver 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