* some small bug & language fixes for mvTextInterface
authorMichael Dale <dale@users.mediawiki.org>
Mon, 9 Nov 2009 07:15:46 +0000 (07:15 +0000)
committerMichael Dale <dale@users.mediawiki.org>
Mon, 9 Nov 2009 07:15:46 +0000 (07:15 +0000)
js2/mwEmbed/libTimedText/mvTextInterface.js
js2/mwEmbed/mv_embed.js
js2/mwEmbed/php/languages/mwEmbed.i18n.php
js2/remoteMwEmbed.js

index 0de6ba7..8a2a2d8 100644 (file)
@@ -55,8 +55,20 @@ mvTextInterface.prototype = {
                                                                'apprefix' : _this.pe.wikiTitleKey,
                                                                'apnamespace' : 102
                                                        }
-                                       }, function( subData ) {                                        
-                                               _this.doProcSubPages( subData, wgServer + wgScriptPath);
+                                       }, function( subData ) {
+                                               if(     subData.error && subData.error.code == 'apunknown_apnamespace'){
+                                                       do_api_req({
+                                                               'url' : apiUrl,
+                                                               'data': {
+                                                                       'list' : 'allpages',
+                                                                       'apprefix' : 'TimedText:' + _this.pe.wikiTitleKey,
+                                                               }
+                                                       }, function( subData ) {
+                                                               _this.doProcSubPages( subData, wgServer + wgScriptPath);
+                                                       });
+                                               }else{
+                                                       _this.doProcSubPages( subData, wgServer + wgScriptPath);
+                                               }
                                        });
                                }
                        }else{
index b4c9e86..4d8255e 100644 (file)
@@ -146,7 +146,7 @@ lcPaths({
        "mvTimedEffectsEdit": "libSequencer/mvTimedEffectsEdit.js",
 
        "mvTextInterface"       : "libTimedText/mvTextInterface.js",
-       "mvTimedTextEdit"       : "libTimedText/mvTimedTextEdit.js"
+       "mvTimeTextEdit"        : "libTimedText/mvTimeTextEdit.js"
 });
 
 // Dependency mapping for CSS files for self-contained included plugins:
@@ -786,7 +786,7 @@ if( !mv_embed_path ) {
 })(window.$mw);
 
 //load in js2 stopgap into proper location: 
-if(gMsg){
+if( typeof gMsg != 'undefined'){
        $mw.lang.loadGM( gMsg )
 }
 
index 779337a..0a4bd35 100644 (file)
@@ -52,6 +52,14 @@ $messages['en'] = array(
        'mwe-no_text_tracks_found' => 'No text subtitles found',
        'mwe-add-edit-subs'     => 'Add/edit subtitles',
 
+       /*
+        * js file: /libTimedText/mvTimeTextEdit.js
+        */
+        'mwe-add-subs-file'      => 'Add/replace subtitle',
+        'mwe-add-subs-file-title'=> 'Select subtitle to upload',
+        'mwe-error-only-srt'     => 'Only srt files can be uploaded right now.',
+        'mwe-watch-video'        => 'Watch video',
+
        /*
         * js file: /libSequencer/mvTimedEffectsEdit.js
         */
index ba9e85c..604cd7e 100644 (file)
@@ -5,7 +5,7 @@
  
 var urlparts = getRemoteEmbedPath();
 var mwEmbedHostPath = urlparts[0];
-var mwRemoteVersion = '1.03';
+var mwRemoteVersion = '1.05';
 
 reqArguments = urlparts[1];
 
@@ -36,7 +36,9 @@ function doPageSpecificRewrite() {
        //timed text display:
        if(wgPageName.indexOf("TimedText") === 0){              
                load_mv_embed(function(){
-                       loadExternalJs( mwEmbedHostPath + '/mwEmbed/libTimedText/mvTimeTextEdit.js' + reqArguments );
+                       $mw.load( ['mvTimeTextEdit'],function(){
+                               //could run init here (but mvTimeTextEdit included onLoad actions)
+                       });
                });
        }