Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -484,6 +484,9 @@ |
485 | 485 | */ |
486 | 486 | cleanLoadRequest: function( loadRequest ){ |
487 | 487 | var cleanRequest = []; |
| 488 | + if( ! loadRequest ){ |
| 489 | + return []; |
| 490 | + } |
488 | 491 | if( typeof loadRequest == 'string' ) |
489 | 492 | return loadRequest; |
490 | 493 | for( var i =0;i < loadRequest.length; i++ ){ |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadInterface.js |
— | — | @@ -13,10 +13,10 @@ |
14 | 14 | * Dispatches updates to an iframe target for upload proxy |
15 | 15 | * |
16 | 16 | */ |
17 | | -mw.addMessages( { |
| 17 | +mw.addMessages({ |
18 | 18 | "mwe-upload-in-progress" : "Upload in progress (do not close this window)", |
19 | | - "mwe-uploaded-status" : "Uploaded", |
20 | | - "mwe-transcoded-status" : "Transcoded", |
| 19 | + "mwe-uploaded-status" : "$1% Uploaded", |
| 20 | + "mwe-transcoded-status" : "$1% Transcoded", |
21 | 21 | "mwe-uploaded-time-remaining" : "Time remaining: $1", |
22 | 22 | "mwe-upload-done" : "Your upload <i>should be<\/i> accessible." |
23 | 23 | } ); |
— | — | @@ -114,20 +114,15 @@ |
115 | 115 | .css( 'float', 'left' ) |
116 | 116 | .append( |
117 | 117 | $j( '<span />' ) |
118 | | - .attr( 'id' , 'up-pstatus') |
119 | | - .text( '0% -' ), |
120 | | - |
121 | | - $j( '<span />' ) |
122 | 118 | .attr( 'id', 'up-status-state' ) |
123 | 119 | ) |
124 | 120 | ); |
125 | 121 | |
126 | | - var $statusState = $progressContainer.find( '#up-status-state' ); |
127 | | - if( options.statusType == 'transcode' ){ |
128 | | - $statusState.text( gM( 'mwe-transcoded-status' ) ); |
129 | | - } else { |
130 | | - $statusState.text( gM( 'mwe-uploaded-status' ) ); |
131 | | - } |
| 122 | + this.statusKey = options.statusType; |
| 123 | + |
| 124 | + var statusKey = ( this.statusType == 'transcode' ) ? 'mwe-transcoded-status' : 'mwe-uploaded-status'; |
| 125 | + $progressContainer.find( '#up-status-state' ).text( gM( statusKey, 0 ) ); |
| 126 | + |
132 | 127 | |
133 | 128 | // Add the estimated time remaining |
134 | 129 | $progressContainer.append( |
— | — | @@ -161,7 +156,9 @@ |
162 | 157 | var _this = this; |
163 | 158 | |
164 | 159 | $j( '#up-progressbar' ).progressbar( 'value', parseInt( fraction * 100 ) ); |
165 | | - $j( '#up-pstatus' ).html( parseInt( fraction * 100 ) + '% - ' ); |
| 160 | + |
| 161 | + var statusKey = ( this.statusType == 'transcode' ) ? 'mwe-transcoded-status' : 'mwe-uploaded-status'; |
| 162 | + $j( '#up-status-state' ).html( gM( statusKey, parseInt( fraction * 100 ) ) ); |
166 | 163 | |
167 | 164 | if ( _this.uploadBeginTime) { |
168 | 165 | var elapsedMilliseconds = ( new Date() ).getTime() - _this.uploadBeginTime; |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.Firefogg.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | mw.addMessages({ |
8 | | - "mwe-upload-transcoded-status" : "Transcoded", |
| 8 | + "mwe-upload-transcoded-status" : "%1 Transcoded", |
9 | 9 | "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)", |
10 | 10 | "fogg-transcoding" : "Encoding video", |
11 | 11 | "fogg-select_file" : "Select file", |
— | — | @@ -1047,7 +1047,7 @@ |
1048 | 1048 | }, |
1049 | 1049 | |
1050 | 1050 | /** |
1051 | | - * Internal function called once the token and form data is avaliable |
| 1051 | + * Internal function called once the token and form data is available |
1052 | 1052 | */ |
1053 | 1053 | doUploadWithFormData: function() { |
1054 | 1054 | var _this = this; |
— | — | @@ -1057,7 +1057,7 @@ |
1058 | 1058 | } else if ( _this.upload_mode == 'post' ) { |
1059 | 1059 | // Encode and then do a post upload |
1060 | 1060 | _this.doEncode( |
1061 | | - function /* onProgress */ ( progress ) { |
| 1061 | + function /* onProgress */ ( progress ) { |
1062 | 1062 | _this.ui.updateProgress( progress ); |
1063 | 1063 | }, |
1064 | 1064 | function /* onDone */ () { |
— | — | @@ -1222,7 +1222,9 @@ |
1223 | 1223 | */ |
1224 | 1224 | doUploadStatus: function() { |
1225 | 1225 | var _this = this; |
1226 | | - $j( '#up-status-state' ).html( gM( 'mwe-uploaded-status' ) ); |
| 1226 | + $j( '#up-status-state' ).html( |
| 1227 | + gM( 'mwe-uploaded-status', 0 ) |
| 1228 | + ); |
1227 | 1229 | |
1228 | 1230 | _this.oldResponseText = ''; |
1229 | 1231 | |
Index: branches/MwEmbedStandAlone/modules/AddMedia/AddMedia.i18n.php |
— | — | @@ -130,8 +130,8 @@ |
131 | 131 | 'mwe-ie-inline-upload' => 'Inline uploading is currently disabled for Internet Explorer. |
132 | 132 | You can $1, then $2', |
133 | 133 | 'mwe-upload-in-progress' => 'Upload in progress (do not close this window)', |
134 | | - 'mwe-uploaded-status' => 'Uploaded', |
135 | | - 'mwe-transcoded-status' => 'Transcoded', |
| 134 | + 'mwe-uploaded-status' => '$1% Uploaded', |
| 135 | + 'mwe-transcoded-status' => '$1% Transcoded', |
136 | 136 | 'mwe-uploaded-time-remaining' => 'Time remaining: $1', |
137 | 137 | 'mwe-upload-done' => 'Your upload <i>should be</i> accessible.', |
138 | 138 | 'mwe-add_media_wizard' => 'Add media wizard', |