r84944 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84943‎ | r84944 | r84945 >
Date:02:06, 29 March 2011
Author:dale
Status:deferred
Tags:
Comment:
removed default 'request transcript link' from captions menu by default
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.config.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.i18n.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.config.php
@@ -15,8 +15,11 @@
1616 * If the "add timed text" link / interface should be exposed
1717 * allows usere to upload text files to the wiki
1818 */
19 - 'TimedText.showAddTextLink' => false,
 19+ 'TimedText.ShowAddTextLink' => false,
2020
 21+ // If the link to request a transcript should be shown on video files
 22+ 'TimedText.ShowRequestTranscript' => false,
 23+
2124 // The category for listing videos that need transcription:
2225 'TimedText.NeedsTranscriptCategory' => 'Videos needing subtitles'
2326 );
\ No newline at end of file
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js
@@ -27,7 +27,7 @@
2828 return true;
2929 }
3030 // Do a module check for timed Text support ( module must add data property 'SupportsTimedText' )
31 - $( embedPlayer ).trigger('SupportsTimedText' );
 31+ $( embedPlayer ).trigger( 'SupportsTimedText' );
3232
3333 if( $( embedPlayer ).data( 'SupportsTimedText' ) ){
3434 return true;
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js
@@ -659,11 +659,17 @@
660660 );
661661 } else {
662662 // 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+ }
668674 }
669675
670676 // 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 @@
5757 'mwe-timedtext-language-subtitles-for-clip' => '$1 subtitles for clip: $2',
5858 'mwe-timedtext-language-no-subtitles-for-clip' => 'No $1 subtitles were found for clip: $2',
5959 'mwe-timedtext-request-subs' => 'Request transcription',
 60+ 'mwe-timedtext-no-subs' => 'No text tracks available',
6061 'mwe-timedtext-request-subs-desc' => 'Add a request for this video file to be transcribed',
6162 'mwe-timedtext-request-subs-done' => 'Transcription request added. [$1 See all transcribe requests]',
6263 'mwe-timedtext-request-subs-fail' => 'Failed to add transcription request. Are you logged in?',

Status & tagging log