Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.config.php |
— | — | @@ -15,8 +15,11 @@ |
16 | 16 | * If the "add timed text" link / interface should be exposed |
17 | 17 | * allows usere to upload text files to the wiki |
18 | 18 | */ |
19 | | - 'TimedText.showAddTextLink' => false, |
| 19 | + 'TimedText.ShowAddTextLink' => false, |
20 | 20 | |
| 21 | + // If the link to request a transcript should be shown on video files |
| 22 | + 'TimedText.ShowRequestTranscript' => false, |
| 23 | + |
21 | 24 | // The category for listing videos that need transcription: |
22 | 25 | 'TimedText.NeedsTranscriptCategory' => 'Videos needing subtitles' |
23 | 26 | ); |
\ No newline at end of file |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | return true; |
29 | 29 | } |
30 | 30 | // Do a module check for timed Text support ( module must add data property 'SupportsTimedText' ) |
31 | | - $( embedPlayer ).trigger('SupportsTimedText' ); |
| 31 | + $( embedPlayer ).trigger( 'SupportsTimedText' ); |
32 | 32 | |
33 | 33 | if( $( embedPlayer ).data( 'SupportsTimedText' ) ){ |
34 | 34 | return true; |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js |
— | — | @@ -659,11 +659,17 @@ |
660 | 660 | ); |
661 | 661 | } else { |
662 | 662 | // Add a link to request timed text for this clip: |
663 | | - $menu.append( |
664 | | - $.getLineItem( gM( 'mwe-timedtext-request-subs'), 'comment', function(){ |
665 | | - _this.getAddSubRequest(); |
666 | | - }) |
667 | | - ); |
| 663 | + if( mw.getConfig('TimedText.ShowRequestTranscript') ){ |
| 664 | + $menu.append( |
| 665 | + $.getLineItem( gM( 'mwe-timedtext-request-subs'), 'comment', function(){ |
| 666 | + _this.getAddSubRequest(); |
| 667 | + }) |
| 668 | + ); |
| 669 | + } else { |
| 670 | + $menu.append( |
| 671 | + $.getLineItem( gM( 'mwe-timedtext-no-subs'), 'close' ) |
| 672 | + ) |
| 673 | + } |
668 | 674 | } |
669 | 675 | |
670 | 676 | // Put in the "Make Transcript" link if config enabled and we have an api key |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.i18n.php |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | 'mwe-timedtext-language-subtitles-for-clip' => '$1 subtitles for clip: $2', |
58 | 58 | 'mwe-timedtext-language-no-subtitles-for-clip' => 'No $1 subtitles were found for clip: $2', |
59 | 59 | 'mwe-timedtext-request-subs' => 'Request transcription', |
| 60 | + 'mwe-timedtext-no-subs' => 'No text tracks available', |
60 | 61 | 'mwe-timedtext-request-subs-desc' => 'Add a request for this video file to be transcribed', |
61 | 62 | 'mwe-timedtext-request-subs-done' => 'Transcription request added. [$1 See all transcribe requests]', |
62 | 63 | 'mwe-timedtext-request-subs-fail' => 'Failed to add transcription request. Are you logged in?', |