translate(zeeguuTag) {
        this.undoStack.pushState();
        let tmp_trans = this._mergeZeeguu(zeeguuTag);

        let text = zeeguuTag.textContent.trim();
        let context = Translator._getContext(zeeguuTag);
        let url = window.location.href;
        let title = $(config.HTML_ID_ARTICLE_TITLE).text();

        let orig = document.createElement(config.HTML_ORIGINAL);
        let tran = document.createElement(config.HTML_TRANSLATED);

        $(orig).text(text);
        $(zeeguuTag).addClass("origtrans");
        $(zeeguuTag).addClass(config.CLASS_LOADING);
        $(tran).attr('chosen', tmp_trans);
        $(zeeguuTag).empty().append(tran, orig);

        let callback = (data) => this._setTranslations(zeeguuTag, data);
        // Launch Zeeguu request to fill translation options.
        ZeeguuRequests.post(GET_TRANSLATIONS_ENDPOINT + '/' + this.from_language + '/' + this.to_language,
            {word: text, context: context, url: url, title: title}, callback);

        UserActivityLogger.log_article_interaction(USER_EVENT_TRANSLATE, text);
    }
/**
     * Merge the surrounding translated zeeguuTags
     * and insert translations for the tag's content by calling Zeeguu.
     * Uses {@link ZeeguuRequests}.
     * @param {Element} zeeguuTag - Document element containing the content to be translated.
     */
Merge the surrounding translated zeeguuTags
and insert translations for the tag's content by calling Zeeguu.
Merge the surrounding translated zeeguuTags and insert translations for the tag ' s content by calling Zeeguu .
translate(zeeguuTag) {
        this.undoStack.pushState();
        let tmp_trans = this._mergeZeeguu(zeeguuTag);
        let text = zeeguuTag.textContent.trim();
        let context = Translator._getContext(zeeguuTag);
        let url = window.location.href;
        let title = $(config.HTML_ID_ARTICLE_TITLE).text();
        let orig = document.createElement(config.HTML_ORIGINAL);
        let tran = document.createElement(config.HTML_TRANSLATED);
        $(orig).text(text);
        $(zeeguuTag).addClass("origtrans");
        $(zeeguuTag).addClass(config.CLASS_LOADING);
        $(tran).attr('chosen', tmp_trans);
        $(zeeguuTag).empty().append(tran, orig);
        let callback = (data) => this._setTranslations(zeeguuTag, data);
        ZeeguuRequests.post(GET_TRANSLATIONS_ENDPOINT + '/' + this.from_language + '/' + this.to_language,
            {word: text, context: context, url: url, title: title}, callback);
        UserActivityLogger.log_article_interaction(USER_EVENT_TRANSLATE, text);
    }
translate ( zeeguuTag ) { this . undoStack . pushState ( ) ; let tmp_trans = this . _mergeZeeguu ( zeeguuTag ) ; let text = zeeguuTag . textContent . trim ( ) ; let context = Translator . _getContext ( zeeguuTag ) ; let url = window . location . href ; let title = $ ( config . HTML_ID_ARTICLE_TITLE ) . text ( ) ; let orig = document . createElement ( config . HTML_ORIGINAL ) ; let tran = document . createElement ( config . HTML_TRANSLATED ) ; $ ( orig ) . text ( text ) ; $ ( zeeguuTag ) . addClass ( "origtrans" ) ; $ ( zeeguuTag ) . addClass ( config . CLASS_LOADING ) ; $ ( tran ) . attr ( 'chosen' , tmp_trans ) ; $ ( zeeguuTag ) . empty ( ) . append ( tran , orig ) ; let callback = ( data ) => this . _setTranslations ( zeeguuTag , data ) ; ZeeguuRequests . post ( GET_TRANSLATIONS_ENDPOINT + '/' + this . from_language + '/' + this . to_language , { word : text , context : context , url : url , title : title } , callback ) ; UserActivityLogger . log_article_interaction ( USER_EVENT_TRANSLATE , text ) ; }
Merge the surrounding translated zeeguuTags
 and insert translations for the tag's content by calling Zeeguu.
Merge the surrounding translated zeeguuTags and insert translations for the tag ' s content by calling Zeeguu .
// Launch Zeeguu request to fill translation options.