<commit_before>// Universal Subtitles, universalsubtitles.org
//
// Copyright (C) 2010 Participatory Culture Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see
// http://www.gnu.org/licenses/agpl-3.0.html.

goog.provide('mirosubs.RequestDialog');

/**
 * @constructor
 * @param {string} videoID
 */
mirosubs.RequestDialog = function(videoID) {
    goog.ui.Dialog.call(this, 'mirosubs-modal-lang', true);
    this.setButtonSet(null);
    this.setDisposeOnHide(true);
    this.videoID_ = videoID;
    this.langMenuCount_ = 0;

    // Stores the languages of the user
    this.myLanguages_ = [];
    // Stores all availalbe languages for requesting subtitles.
    this.allLanguages_ = [];
    // Stores languages being requested
    this.requestLanguages_ = [];
    // Stores if the request should be tracked by the user
    this.track_ = true;
    // Stores the description for the request
    this.description_ = null;
    /**
     * The string which will denote no language selected
     * @const
     * @type {string}
     */
    this.EMPTY_LANG_ = '-------------'
    /**
     * Label for tracking request checkbox
     * @const
     * @type {string}
     */
    this.TRACK_REQUEST_LABEL_ = 'Keep me posted on any relating activities';
    /**
     * The default content of request description text area
     * @const
     * @type {string}
     */
    this.DESCRIPTION_INITIAL_ = 'Please tell us the reason you need these '+
                                'subtitles so that volunteers can act '    +
                                'appropriately.';
    /**
     * Displayed on a successfull request submission
     * @const
     * @type {string}
     */
    this.SUBMISSION_CONFIRM_ = 'Request Submitted. Thanks!';
    /**
     * Error to be shown when the response from server is negetive
     * @const
     * @type {string}
     */
    this.SUBMIT_ERROR_ = 'An error occured in submitting the request.';
};
goog.inherits(mirosubs.RequestDialog, goog.ui.Dialog);

mirosubs.RequestDialog.prototype.createDom = function() {
    mirosubs.RequestDialog.superClass_.createDom.call(this);
    var $d = goog.bind(this.getDomHelper().createDom,
                       this.getDomHelper());
    var el = this.getContentElement();
    this.headingDiv_ = $d('h3', null, 'Request subtitles');
    this.loadingDiv_ = $d('p', null, 'Loading...')
    this.contentDiv_ = $d('div', {'className':'mirosubs-request-div'}, this.loadingDiv_);
    goog.dom.append(el, this.headingDiv_, this.contentDiv_);
};

mirosubs.RequestDialog.prototype.enterDocument = function() {
    mirosubs.RequestDialog.superClass_.enterDocument.call(this);
    this.connectEvents_();
};<commit_msg>Fix UI text in request dialogue<commit_after>// Universal Subtitles, universalsubtitles.org
//
// Copyright (C) 2010 Participatory Culture Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see
// http://www.gnu.org/licenses/agpl-3.0.html.

goog.provide('mirosubs.RequestDialog');

/**
 * @constructor
 * @param {string} videoID
 */
mirosubs.RequestDialog = function(videoID) {
    goog.ui.Dialog.call(this, 'mirosubs-modal-lang', true);
    this.setButtonSet(null);
    this.setDisposeOnHide(true);
    this.videoID_ = videoID;
    this.langMenuCount_ = 0;

    // Stores the languages of the user
    this.myLanguages_ = [];
    // Stores all availalbe languages for requesting subtitles.
    this.allLanguages_ = [];
    // Stores languages being requested
    this.requestLanguages_ = [];
    // Stores if the request should be tracked by the user
    this.track_ = true;
    // Stores the description for the request
    this.description_ = null;
    /**
     * The string which will denote no language selected
     * @const
     * @type {string}
     */
    this.EMPTY_LANG_ = '-------------'
    /**
     * Label for tracking request checkbox
     * @const
     * @type {string}
     */
    this.TRACK_REQUEST_LABEL_ = 'Keep me posted about future relating activity';
    /**
     * The default content of request description text area
     * @const
     * @type {string}
     */
    this.DESCRIPTION_INITIAL_ = 'Please tell us about the reason you need '+
                                'the subtitles so that volunteers can act '+
                                'appropriately.';
    /**
     * Displayed on a successfull request submission
     * @const
     * @type {string}
     */
    this.SUBMISSION_CONFIRM_ = 'Request Submitted. Thanks!';
    /**
     * Error to be shown when the response from server is negetive
     * @const
     * @type {string}
     */
    this.SUBMIT_ERROR_ = 'An error occured in submitting the request.';
};
goog.inherits(mirosubs.RequestDialog, goog.ui.Dialog);

mirosubs.RequestDialog.prototype.createDom = function() {
    mirosubs.RequestDialog.superClass_.createDom.call(this);
    var $d = goog.bind(this.getDomHelper().createDom,
                       this.getDomHelper());
    var el = this.getContentElement();
    this.headingDiv_ = $d('h3', null, 'Request subtitles');
    this.loadingDiv_ = $d('p', null, 'Loading...')
    this.contentDiv_ = $d('div', {'className':'mirosubs-request-div'}, this.loadingDiv_);
    goog.dom.append(el, this.headingDiv_, this.contentDiv_);
};

mirosubs.RequestDialog.prototype.enterDocument = function() {
    mirosubs.RequestDialog.superClass_.enterDocument.call(this);
    this.connectEvents_();
};
{'fraction_non_alphanumeric': 0.11406727828746177, 'fraction_numerical': 0.0027522935779816515, 'mean_word_length': 2.81399416909621, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7117601', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1862, 'n_words': 586}