Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ClosedCaptionButton.web.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @flow
  2. import { translate } from '../../base/i18n';
  3. import { IconClosedCaption } from '../../base/icons';
  4. import { connect } from '../../base/redux';
  5. import { toggleLanguageSelectorDialog } from '../actions';
  6. import {
  7. AbstractClosedCaptionButton,
  8. _abstractMapStateToProps
  9. } from './AbstractClosedCaptionButton';
  10. /**
  11. * A button which starts/stops the transcriptions.
  12. */
  13. class ClosedCaptionButton
  14. extends AbstractClosedCaptionButton {
  15. accessibilityLabel = 'toolbar.accessibilityLabel.cc';
  16. icon = IconClosedCaption;
  17. tooltip = 'transcribing.ccButtonTooltip';
  18. label = 'toolbar.startSubtitles';
  19. labelProps = {
  20. language: this.props.t(this.props._language),
  21. languages: this.props.t(this.props.languages),
  22. languagesHead: this.props.t(this.props.languagesHead)
  23. };
  24. /**
  25. * Toggle language selection dialog.
  26. *
  27. * @returns {void}
  28. */
  29. _handleClickOpenLanguageSelector() {
  30. const { dispatch } = this.props;
  31. dispatch(toggleLanguageSelectorDialog());
  32. }
  33. }
  34. export default translate(connect(_abstractMapStateToProps)(ClosedCaptionButton));