r74963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74962‎ | r74963 | r74964 >
Date:20:04, 18 October 2010
Author:dale
Status:deferred
Tags:
Comment:
fix for categories with multiple spaces, added link to category list to 'video already in list' msg
Modified paths:
  • /branches/MwEmbedStandAlone/modules/TimedText/TimedText.i18n.php (modified) (history)
  • /branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js
@@ -503,6 +503,9 @@
504504 var catName = mw.getConfig( 'TimedText.NeedsTranscriptCategory' );
505505 var $dialog = $j(this);
506506
 507+ var subRequestCategoryUrl = apiUrl.replace('api.php', 'index.php') +
 508+ '?title=Category:' + catName.replace(/ /g, '_');
 509+
507510 var buttonOk= {};
508511 buttonOk[gM('mwe-ok')] =function(){
509512 $j(this).dialog('close');
@@ -520,7 +523,7 @@
521524 var categories = data.query.pages[i].categories;
522525 for(var j =0; j < categories.length; j++){
523526 if( categories[j].title.indexOf( catName ) != -1 ){
524 - $dialog.html( gM('mwe-timedtext-request-already-done') );
 527+ $dialog.html( gM('mwe-timedtext-request-already-done', subRequestCategoryUrl ) );
525528 $dialog.dialog( 'option', 'buttons', buttonOk);
526529 return ;
527530 }
@@ -551,10 +554,8 @@
552555 // Do the edit request:
553556 mw.getJSON( apiUrl, request, function(data){
554557 if( data.edit && data.edit.newrevid){
555 - $dialog.html( gM('mwe-timedtext-request-subs-done',
556 - apiUrl.replace('api.php', 'index.php') +
557 - '?title=Category:' + catName.replace(' ', '_')
558 - )
 558+
 559+ $dialog.html( gM('mwe-timedtext-request-subs-done', subRequestCategoryUrl )
559560 );
560561 } else {
561562 $dialog.html( gM('mwe-timedtext-request-subs-fail') );
Index: branches/MwEmbedStandAlone/modules/TimedText/TimedText.i18n.php
@@ -59,7 +59,7 @@
6060 'mwe-timedtext-request-subs-desc' => 'Add a request for this video file to be transcribed',
6161 'mwe-timedtext-request-subs-done' => 'Transcription request added. [$1 See all transcribe requests]',
6262 'mwe-timedtext-request-subs-fail' => 'Failed to add transcription request, Are you logged in? ',
63 - 'mwe-timedtext-request-already-done' => 'A transcription of this video has already been requested',
 63+ 'mwe-timedtext-request-already-done' => 'A transcription of this video has already been requested. [$1 See all transcribe requests]',
6464 );
6565
6666 /** Message documentation (Message documentation)
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -4,7 +4,7 @@
55 */
66 var urlparts = getRemoteEmbedPath();
77 var mwEmbedHostPath = urlparts[0];
8 -var mwRemoteVersion = 'r167';
 8+var mwRemoteVersion = 'r168';
99 var mwUseScriptLoader = true;
1010
1111 // Log the mwRemote version makes it easy to debug cache issues

Status & tagging log