Commit aee69ae7 by Ned Batchelder Committed by GitHub

Merge pull request #15730 from edx/ajax-captions

Dont fetch caption on getting translations
parents d17bc753 1e77253f
......@@ -779,7 +779,6 @@
Caption.fetchAvailableTranslations();
expect($.ajaxWithPrefix).toHaveBeenCalled();
expect(Caption.fetchCaption).toHaveBeenCalled();
expect(state.config.transcriptLanguages).toEqual({
'uk': 'Ukrainian',
'de': 'German'
......@@ -799,7 +798,6 @@
Caption.fetchAvailableTranslations();
expect($.ajaxWithPrefix).toHaveBeenCalled();
expect(Caption.fetchCaption).not.toHaveBeenCalled();
expect(state.config.transcriptLanguages).toEqual({});
expect(Caption.renderLanguageMenu).not.toHaveBeenCalled();
});
......
......@@ -596,8 +596,8 @@
},
/**
* @desc Fetch the list of available translations. Upon successful receipt,
* the list of available translations will be updated.
* @desc Fetch the list of available language codes. Upon successful receipt
* the list of available languages will be updated.
*
* @returns {jquery Promise}
*/
......@@ -618,8 +618,6 @@
self.container.find('.langs-list').remove();
if (_.keys(newLanguages).length) {
// And try again to fetch transcript.
self.fetchCaption();
self.renderLanguageMenu(newLanguages);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment