Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/137548
Change subject: Error handler for dictionary lookup failures ...................................................................... Error handler for dictionary lookup failures Hide the dictionary card if the api response is a failre Change-Id: I1998e87aa01f602995000b32d936621e454f977f --- M modules/tools/ext.cx.tools.dictionary.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/48/137548/1 diff --git a/modules/tools/ext.cx.tools.dictionary.js b/modules/tools/ext.cx.tools.dictionary.js index 3419762..bb9d840 100644 --- a/modules/tools/ext.cx.tools.dictionary.js +++ b/modules/tools/ext.cx.tools.dictionary.js @@ -103,7 +103,8 @@ } this.$card.find( '.card__headword' ).text( word ); getTranslation( word, mw.cx.sourceLanguage, mw.cx.targetLanguage ) - .done( $.proxy( this.showResult, this ) ); + .done( $.proxy( this.showResult, this ) ) + .fail( $.proxy( this.stop, this ) ); }; DictionaryCard.prototype.stop = function () { -- To view, visit https://gerrit.wikimedia.org/r/137548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1998e87aa01f602995000b32d936621e454f977f 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