diff --git a/src/js/tracks/text-track-fieldset.js b/src/js/tracks/text-track-fieldset.js index b8f69df9f3..945c21cf62 100644 --- a/src/js/tracks/text-track-fieldset.js +++ b/src/js/tracks/text-track-fieldset.js @@ -87,7 +87,7 @@ class TextTrackFieldset extends Component { const label = Dom.createEl('label', { id, className: 'vjs-label', - textContent: selectConfig.label + textContent: this.localize(selectConfig.label) }); label.setAttribute('for', guid); diff --git a/src/js/tracks/text-track-select.js b/src/js/tracks/text-track-select.js index 288bc55b7a..99bb538ee3 100644 --- a/src/js/tracks/text-track-select.js +++ b/src/js/tracks/text-track-select.js @@ -68,7 +68,7 @@ class TextTrackSelect extends Component { { id: optionId, value: this.localize(optionText[0]), - textContent: optionText[1] + textContent: this.localize(optionText[1]) } ); diff --git a/test/unit/tracks/text-track-settings.test.js b/test/unit/tracks/text-track-settings.test.js index e20a93664a..1eec3e6aef 100644 --- a/test/unit/tracks/text-track-settings.test.js +++ b/test/unit/tracks/text-track-settings.test.js @@ -375,10 +375,16 @@ QUnit.test('should update on languagechange', function(assert) { tracks }); - videojs.addLanguage('test', {'Font Size': 'FONTSIZE'}); + videojs.addLanguage('test', { + 'Font Size': 'FONTSIZE', + 'Color': 'COLOR', + 'White': 'WHITE' + }); player.language('test'); assert.equal(player.$('.vjs-font-percent legend').textContent, 'FONTSIZE', 'settings dialog updates on languagechange'); + assert.equal(player.$('.vjs-text-color label').textContent, 'COLOR', 'settings dialog label updates on languagechange'); + assert.equal(player.$('.vjs-text-color select option').textContent, 'WHITE', 'settings dialog select updates on languagechange'); player.dispose(); });