r55313 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55312‎ | r55313 | r55314 >
Date:10:28, 19 August 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* remove message "wgfogg_wrong_version"; was unused
* rename some message keys, to avoid duplicates in mwEmbed.i18n.php with other MediaWiki message keys (not yet done)
* fix link errors and unwanted changes introduced in r55296 where ":" was replaced by " : " also in messages
* update mwEmbed.i18n.php with updated keys
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/mv_embed.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php (modified) (history)
  • /trunk/phase3/js2/uploadPage.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -9,9 +9,9 @@
1010 "fogg-save_local_file" : "Save Ogg",
1111 "fogg-check_for_fogg" : "Checking for Firefogg <blink>...<\/blink>",
1212 "fogg-installed" : "Firefogg is installed",
13 - "fogg-for_improved_uplods" : "For improved uploads : ",
14 - "fogg-please_install" : "<a href=\"$1\">Install Firefogg<\/a>. More <a href=\"http : \/\/commons.wikimedia.org\/wiki\/Commons : Firefogg\">about Firefogg<\/a>",
15 - "fogg-use_latest_fox" : "Please first install <a href=\"http : \/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=firefogg\">Firefox 3.5<\/a> (or later). <i>Then revisit this page to install the <b>Firefogg<\/b> extension.<\/i>",
 13+ "fogg-for_improved_uplods" : "For improved uploads:",
 14+ "fogg-please_install" : "<a href=\"$1\">Install Firefogg<\/a>. More <a href=\"http:\/\/commons.wikimedia.org\/wiki\/Commons:Firefogg\">about Firefogg<\/a>",
 15+ "fogg-use_latest_fox" : "Please first install <a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=firefogg\">Firefox 3.5<\/a> (or later). <i>Then revisit this page to install the <b>Firefogg<\/b> extension.<\/i>",
1616 "fogg-passthrough_mode" : "Your selected file is already Ogg or not a video file",
1717 "fogg-transcoding" : "Encoding video to Ogg",
1818 "fogg-encoding-done" : "Encoding complete",
@@ -430,7 +430,7 @@
431431 if( !this.form_rewrite )
432432 return gM('fogg-transcoding');
433433 //else return our upload+transcode msg:
434 - return gM('upload-transcode-in-progress');
 434+ return gM('mwe-upload-transcode-in-progress');
435435 },
436436 doUploadSwitch:function(){
437437 var _this = this;
@@ -529,7 +529,7 @@
530530
531531
532532 //show transcode status:
533 - $j('#up-status-state').html( gM('upload-transcoded-status') );
 533+ $j('#up-status-state').html( gM('mwe-upload-transcoded-status') );
534534
535535 //setup a local function for timed callback:
536536 var encodingStatus = function() {
@@ -578,7 +578,7 @@
579579 },
580580 doUploadStatus:function() {
581581 var _this = this;
582 - $j( '#up-status-state' ).html( gM('uploaded-status') );
 582+ $j( '#up-status-state' ).html( gM('mwe-uploaded-status') );
583583
584584 _this.oldResponseText = '';
585585 //setup a local function for timed callback:
@@ -630,15 +630,15 @@
631631 if( _this.upload_mode == 'api' ){
632632 if( apiResult.resultUrl ){
633633 var buttons ={};
634 - buttons[gM('go-to-resource')] = function(){
 634+ buttons[gM('mwe-go-to-resource')] = function(){
635635 window.location = apiResult.resultUrl;
636636 }
637 - var go_to_url_txt = gM('go-to-resource');
 637+ var go_to_url_txt = gM('mwe-go-to-resource');
638638 if( typeof _this.done_upload_cb == 'function' ){
639639 //if done action return 'true'
640640 if( _this.done_upload_cb() ){
641641 //update status
642 - _this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', apiResult.resultUrl),buttons);
 642+ _this.updateProgressWin( gM('mwe-successfulupload'), gM( 'mwe-upload_done', apiResult.resultUrl),buttons);
643643 }else{
644644 //if done action returns 'false' //close progress window
645645 this.action_done = true;
@@ -646,11 +646,11 @@
647647 }
648648 }else{
649649 //update status (without done_upload_cb)
650 - _this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', apiResult.resultUrl),buttons);
 650+ _this.updateProgressWin( gM('mwe-successfulupload'), gM( 'mwe-upload_done', apiResult.resultUrl),buttons);
651651 }
652652 }else{
653653 //done state with error? ..not really possible given how firefogg works
654 - js_log(" upload done, in chunks mode, but no resultUrl!");
 654+ js_log(" Upload done in chunks mode, but no resultUrl!");
655655 }
656656 }else if( _this.upload_mode == 'post' && _this.api_url ) {
657657 _this.procPageResponse( response_text );
@@ -667,7 +667,7 @@
668668 return this.pe_cancel_action();
669669 }
670670 js_log('firefogg:cancel')
671 - if( confirm( gM('mv-cancel-confim') )){
 671+ if( confirm( gM('mwe-cancel-confim') )){
672672 if(navigator.oscpu && navigator.oscpu.search('Win') >= 0){
673673 alert( 'sorry we do not yet support cancel on windows' );
674674 }else{
@@ -689,13 +689,13 @@
690690 var sstring = 'var wgTitle = "' + this.formData['wpDestFile'].replace('_',' ');
691691
692692 if(wgArticlePath){
693 - var result_txt = gM('mv_upload_done', wgArticlePath.replace(/\$1/, 'File:' + _this.formData['wpDestFile'] ) );
 693+ var result_txt = gM('mwe-upload_done', wgArticlePath.replace(/\$1/, 'File:' + _this.formData['wpDestFile'] ) );
694694 }else{
695 - result_txt = 'File has uploaded but api "done" url was provided. Check the log for result page output';
 695+ result_txt = 'File has uploaded but api "done" URL was provided. Check the log for result page output';
696696 }
697697
698698 //set the error text in case we dont' get far along in processing the response
699 - _this.updateProgressWin( gM('mv_upload_completed'), result_txt );
 699+ _this.updateProgressWin( gM('mwe-upload_completed'), result_txt );
700700
701701 if( result_page && result_page.toLowerCase().indexOf( sstring.toLowerCase() ) != -1){
702702 js_log( 'upload done got redirect found: ' + sstring + ' r:' + _this.done_upload_cb );
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -4,31 +4,30 @@
55 * this base uploader is optionally extended by firefogg
66 */
77 loadGM({
8 - "upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)",
9 - "upload-in-progress" : "Upload in progress (do not close this window)",
10 - "upload-transcoded-status" : "Transcoded",
11 - "uploaded-status" : "Uploaded",
12 - "wgfogg_wrong_version" : "You have Firefogg installed but it is outdated. <a href=\"http : \/\/firefogg.org\">Please upgrade<\/a>.",
13 - "upload-stats-fileprogres" : "$1 of $2",
14 - "mv_upload_completed" : "Your upload is complete",
15 - "mv_upload_done" : "<a href=\"$1\">Your upload <i>should be<\/i> accessible<\/a>.",
16 - "upload-unknown-size" : "Unknown size",
17 - "mv-cancel-confim" : "Are you sure you want to cancel?",
18 - "successfulupload" : "Upload successful",
19 - "uploaderror" : "Upload error",
20 - "uploadwarning" : "Upload warning",
21 - "unknown-error" : "Unknown error : ",
22 - "return-to-form" : "Return to form",
23 - "file-exists-duplicate" : "This file is a duplicate of the following file : ",
24 - "fileexists" : "A file with this name exists already. Please check <b><tt>$1<\/tt><\/b> if you are not sure if you want to change it.",
25 - "fileexists-thumb" : "<center><b>Existing file<\/b><\/center>",
26 - "ignorewarning" : "Ignore warning and save file anyway",
27 - "file-thumbnail-no" : "The filename begins with <b><tt>$1<\/tt><\/b>",
28 - "go-to-resource" : "Go to resource page",
29 - "upload-misc-error" : "Unknown upload error",
30 - "wgfogg_waring_bad_extension" : "You have selected a file with an unsuported extension (<a href=\"http : \/\/commons.wikimedia.org\/wiki\/Commons : Firefogg#Supported_File_Types\">more information<\/a>).",
31 - "cancel-button" : "Cancel",
32 - "ok-button" : "OK"
 8+ "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)",
 9+ "mwe-upload-in-progress" : "Upload in progress (do not close this window)",
 10+ "mwe-upload-transcoded-status" : "Transcoded",
 11+ "mwe-uploaded-status" : "Uploaded",
 12+ "mwe-upload-stats-fileprogres" : "$1 of $2",
 13+ "mwe-upload_completed" : "Your upload is complete",
 14+ "mwe-upload_done" : "<a href=\"$1\">Your upload <i>should be<\/i> accessible<\/a>.",
 15+ "mwe-upload-unknown-size" : "Unknown size",
 16+ "mwe-cancel-confim" : "Are you sure you want to cancel?",
 17+ "mwe-successfulupload" : "Upload successful",
 18+ "mwe-uploaderror" : "Upload error",
 19+ "mwe-uploadwarning" : "Upload warning",
 20+ "mwe-unknown-error" : "Unknown error:",
 21+ "mwe-return-to-form" : "Return to form",
 22+ "mwe-file-exists-duplicate" : "This file is a duplicate of the following file:",
 23+ "mwe-fileexists" : "A file with this name exists already. Please check <b><tt>$1<\/tt><\/b> if you are not sure if you want to change it.",
 24+ "mwe-fileexists-thumb" : "<center><b>Existing file<\/b><\/center>",
 25+ "mwe-ignorewarning" : "Ignore warning and save file anyway",
 26+ "mwe-file-thumbnail-no" : "The filename begins with <b><tt>$1<\/tt><\/b>",
 27+ "mwe-go-to-resource" : "Go to resource page",
 28+ "mwe-upload-misc-error" : "Unknown upload error",
 29+ "mwe-wgfogg_warning_bad_extension" : "You have selected a file with an unsuported extension (<a href=\"http:\/\/commons.wikimedia.org\/wiki\/Commons:Firefogg#Supported_File_Types\">more information<\/a>).",
 30+ "mwe-cancel-button" : "Cancel",
 31+ "mwe-ok-button" : "OK"
3332 });
3433
3534
@@ -209,7 +208,7 @@
210209
211210 //update the status to 100% progress bar (no status in iframe submit)
212211 $j('#up-progressbar' ).progressbar('value', parseInt( 100 ) );
213 - $j('#up-status-container').html( gM('upload-in-progress') );
 212+ $j('#up-status-container').html( gM('mwe-upload-in-progress') );
214213
215214 js_log('do iframe form submit to: ' + $j(_this.editForm).attr('target'));
216215
@@ -381,7 +380,7 @@
382381 _this.updateProgress( perc );
383382 //special case update the file progress where we have data size:
384383 $j('#up-status-container').html(
385 - gM('upload-stats-fileprogres', [
 384+ gM('mwe-upload-stats-fileprogres', [
386385 formatSize( data.upload['loaded'] ),
387386 formatSize( data.upload['content_length'] )
388387 ]
@@ -392,9 +391,9 @@
393392 js_log('just have loaded (no cotent length: ' + data.upload['loaded']);
394393 //for lack of content-length requests:
395394 $j('#up-status-container').html(
396 - gM('upload-stats-fileprogres', [
 395+ gM('mwe-upload-stats-fileprogres', [
397396 formatSize( data.upload['loaded'] ),
398 - gM('upload-unknown-size')
 397+ gM('mwe-upload-unknown-size')
399398 ]
400399 )
401400 );
@@ -410,7 +409,7 @@
411410 if( apiRes.error || ( apiRes.upload && apiRes.upload.result == "Failure" ) ){
412411 //gennerate the error button:
413412 var bObj = {};
414 - bObj[ gM('return-to-form') ] = function(){
 413+ bObj[ gM('mwe-return-to-form') ] = function(){
415414 _this.form_post_override = false;
416415 $j(this).dialog('close');
417416 };
@@ -472,31 +471,31 @@
473472 if( apiRes.upload.error == 'internal-error'){
474473 errorKey = apiRes.upload.details[0];
475474 gMsgLoadRemote(errorKey, function(){
476 - _this.updateProgressWin( gM( 'uploaderror' ), gM( errorKey ), bObj );
 475+ _this.updateProgressWin( gM( 'mwe-uploaderror' ), gM( errorKey ), bObj );
477476
478477 });
479478 return false;
480479 }
481480
482 - _this.updateProgressWin( gM('uploaderror'), gM('unknown-error') + '<br>' + error_msg, bObj );
 481+ _this.updateProgressWin( gM('mwe-uploaderror'), gM('mwe-unknown-error') + '<br>' + error_msg, bObj );
483482 return false;
484483 }else{
485484 if(apiRes.error && apiRes.error.info ){
486 - _this.updateProgressWin( gM('uploaderror'), apiRes.error.info ,bObj);
 485+ _this.updateProgressWin( gM('mwe-uploaderror'), apiRes.error.info ,bObj);
487486 return false;
488487 }else{
489488 if(typeof error_code == 'number' && typeof error_msg_key[error_code] == 'undefined' ){
490489 if(apiRes.upload.code.finalExt){
491 - _this.updateProgressWin( gM('uploaderror'), gM('wgfogg_waring_bad_extension', apiRes.upload.code.finalExt) , bObj);
 490+ _this.updateProgressWin( gM('mwe-uploaderror'), gM('mwe-wgfogg_warning_bad_extension', apiRes.upload.code.finalExt) , bObj);
492491 }else{
493 - _this.updateProgressWin( gM('uploaderror'), gM('unknown-error') + ' : ' + error_code, bObj);
 492+ _this.updateProgressWin( gM('mwe-uploaderror'), gM('mwe-unknown-error') + ' : ' + error_code, bObj);
494493 }
495494 }else{
496495 js_log('get key: ' + error_msg_key[ error_code ])
497496 gMsgLoadRemote( error_msg_key[ error_code ], function(){
498 - _this.updateProgressWin( gM('uploaderror'), gM( error_msg_key[ error_code ], errorReplaceArg ), bObj);
 497+ _this.updateProgressWin( gM('mwe-uploaderror'), gM( error_msg_key[ error_code ], errorReplaceArg ), bObj);
499498 });
500 - js_log("api.erorr");
 499+ js_log("api.error");
501500 }
502501 return false;
503502 }
@@ -505,7 +504,7 @@
506505 //check for upload.error type erros.
507506 if( apiRes.upload && apiRes.upload.error){
508507 js_log(' apiRes.upload.error: ' + apiRes.upload.error );
509 - _this.updateProgressWin( gM('uploaderror'), gM('unknown-error') + '<br>', bObj);
 508+ _this.updateProgressWin( gM('mwe-uploaderror'), gM('mwe-unknown-error') + '<br>', bObj);
510509 return false;
511510 }
512511 //check for known warnings:
@@ -519,18 +518,18 @@
520519 case 'duplicate':
521520 case 'exists':
522521 if(winfo[1] && winfo[1].title && winfo[1].title.mTextform){
523 - wmsg += gM('file-exists-duplicate') +' '+
 522+ wmsg += gM('mwe-file-exists-duplicate') +' '+
524523 '<b>' + winfo[1].title.mTextform + '</b>';
525524 }else{
526525 //misc error (weird that winfo[1] not present
527 - wmsg += gM('upload-misc-error') + ' ' + wtype;
 526+ wmsg += gM('mwe-upload-misc-error') + ' ' + wtype;
528527 }
529528 break;
530529 case 'file-thumbnail-no':
531 - wmsg += gM('file-thumbnail-no', winfo);
 530+ wmsg += gM('mwe-file-thumbnail-no', winfo);
532531 break;
533532 default:
534 - wmsg += gM('upload-misc-error') + ' ' + wtype;
 533+ wmsg += gM('mwe-upload-misc-error') + ' ' + wtype;
535534 break;
536535 }
537536 wmsg+='</li>';
@@ -539,16 +538,16 @@
540539 if( apiRes.upload.warnings.sessionkey)
541540 _this.warnings_sessionkey = apiRes.upload.warnings.sessionkey;
542541 var bObj = {};
543 - bObj[ gM('ignorewarning') ] = function() {
 542+ bObj[ gM('mwe-ignorewarning') ] = function() {
544543 //re-inciate the upload proccess
545544 $j('#wpIgnoreWarning').attr('checked', true);
546545 $j( '#mw-upload-form' ).submit();
547546 };
548 - bObj[ gM('return-to-form') ] = function(){
 547+ bObj[ gM('mwe-return-to-form') ] = function(){
549548 $j(this).dialog('close');
550549 _this.form_post_override = false;
551550 }
552 - _this.updateProgressWin( gM('uploadwarning'), '<h3>' + gM('uploadwarning') + '</h3>' +wmsg + '<p>',bObj);
 551+ _this.updateProgressWin( gM('mwe-uploadwarning'), '<h3>' + gM('mwe-uploadwarning') + '</h3>' +wmsg + '<p>',bObj);
553552 return false;
554553 }
555554 //should be "OK"
@@ -584,15 +583,15 @@
585584 _this.done_upload_cb( url );
586585 }else{
587586 var bObj = {};
588 - bObj[ gM('return-to-form')] = function(){
 587+ bObj[ gM('mwe-return-to-form')] = function(){
589588 $j(this).dialog('close');
590589 _this.form_post_override = false;
591590 }
592 - bObj[ gM('go-to-resource') ] = function(){
 591+ bObj[ gM('mwe-go-to-resource') ] = function(){
593592 window.location = url;
594593 };
595594 _this.action_done = true;
596 - _this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', url), bObj);
 595+ _this.updateProgressWin( gM('mwe-successfulupload'), gM( 'mwe-upload_done', url), bObj);
597596 js_log('apiRes.upload.imageinfo::'+url);
598597 }
599598 return ;
@@ -612,14 +611,14 @@
613612 }else{
614613 //@@todo should convice the jquery ui people to not use object keys as user msg's
615614 var bObj = {};
616 - bObj[ gM('ok-button') ] = function(){
 615+ bObj[ gM('mwe-ok-button') ] = function(){
617616 $j(this).dialog('close');
618617 };
619618 $j('#upProgressDialog').dialog('option','buttons', bObj);
620619 }
621620 },
622621 getProgressTitle:function(){
623 - return gM('upload-in-progress');
 622+ return gM('mwe-upload-in-progress');
624623 },
625624 getEditForm:function(){
626625 if( this.target_edit_from && $j( this.target_edit_from ).length != 0){
@@ -665,7 +664,7 @@
666665 '<div id="up-progressbar" style="height:15px;"></div>' +
667666 '<div id="up-status-container">'+
668667 '<span id="up-pstatus">0% - </span> ' +
669 - '<span id="up-status-state">' + gM('uploaded-status') + '</span> ' +
 668+ '<span id="up-status-state">' + gM('mwe-uploaded-status') + '</span> ' +
670669 '</div>'+
671670 '</div>'
672671 )
@@ -680,14 +679,14 @@
681680 cancel_button:function(){
682681 var _this = this;
683682 var cancelBtn = new Array();
684 - cancelBtn[ gM('cancel-button') ] = function(){
 683+ cancelBtn[ gM('mwe-cancel-button') ] = function(){
685684 return _this.cancel_action(this)
686685 };
687686 return cancelBtn;
688687 },
689688 cancel_action : function( dlElm ){
690689 //confirm:
691 - if( confirm( gM('mv-cancel-confim') )){
 690+ if( confirm( gM('mwe-cancel-confim') )){
692691 //@@todo (cancel the encode / upload)
693692 $j(this).dialog('close');
694693 return false;
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -52,7 +52,7 @@
5353 "mv_advanced_editor_desc" : "advanced editor (Final Cut style)",
5454 "mv_other_options" : "Other options",
5555 "mv_contextmenu_opt" : "Enable context menus",
56 - "mv_sequencer_credit_line" : "Developed by <a href=\"http : \/\/kaltura.com\">Kaltura, Inc.<\/a> in partnership with the <a href=\"http : \/\/wikimediafoundation.org\/wiki\/Home\">Wikimedia Foundation<\/a> (<a href=\"#\">more information<\/a>)."
 56+ "mv_sequencer_credit_line" : "Developed by <a href=\"http:\/\/kaltura.com\">Kaltura, Inc.<\/a> in partnership with the <a href=\"http:\/\/wikimediafoundation.org\/wiki\/Home\">Wikimedia Foundation<\/a> (<a href=\"#\">more information<\/a>)."
5757 });
5858 //used to set default values and validate the passed init object
5959 var sequencerDefaultValues = {
@@ -142,7 +142,7 @@
143143 },
144144 'cliplib':{
145145 'd':0,
146 - 'html': gM('loading_txt'),
 146+ 'html': gM('mwe-loading_txt'),
147147 'js':function( this_seq ){
148148 //load the search interface with sequence tool targets
149149 mvJsLoader.doLoad( [
Index: trunk/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
@@ -23,7 +23,7 @@
2424 "mv_custom_title" : "Custom title",
2525 "mv_edit_properties" : "Edit properties",
2626 "mv_other_properties" : "Other properties",
27 - "mv_resource_page" : "Resource page : ",
 27+ "mv_resource_page" : "Resource page:",
2828 "mv_set_in_out_points" : "Set in-out points",
2929 "mv_start_time" : "Start time",
3030 "mv_end_time" : "End time",
@@ -522,7 +522,7 @@
523523 '<h3>Edit tools</h3>' +
524524 '<div class="mv_edit_button mv_crop_button_base" id="mv_crop_button" alt="crop" title="'+gM('mv_crop')+'"/>'+
525525 '<a href="#" class="mv_crop_msg">' + gM('mv_crop') + '</a> '+
526 - '<span style="display:none" class="mv_crop_msg_load">' + gM('loading_txt') + '</span> '+
 526+ '<span style="display:none" class="mv_crop_msg_load">' + gM('mwe-loading_txt') + '</span> '+
527527 '<a href="#" style="display:none" class="mv_apply_crop">' + gM('mv_apply_crop') + '</a> '+
528528 '<a href="#" style="display:none" class="mv_rest_crop">' + gM('mv_reset_crop') + '</a> '+
529529 '<hr style="clear:both"/><br>'+
Index: trunk/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php
@@ -19,31 +19,30 @@
2020 /*
2121 * js file: /libAddMedia/mvBaseUploadInterface.js
2222 */
23 - 'upload-transcode-in-progress' => 'Transcode and upload in progress (do not close this window)',
24 - 'upload-in-progress' => 'Upload in progress (do not close this window)',
25 - 'upload-transcoded-status' => 'Transcoded',
26 - 'uploaded-status' => 'Uploaded',
27 - 'wgfogg_wrong_version' => 'You have Firefogg installed but it is outdated. <a href="http://firefogg.org">Please upgrade</a>.',
28 - 'upload-stats-fileprogres' => '$1 of $2',
29 - 'mv_upload_completed' => 'Your upload is complete',
30 - 'mv_upload_done' => '<a href="$1">Your upload <i>should be</i> accessible</a>.',
31 - 'upload-unknown-size' => 'Unknown size',
32 - 'mv-cancel-confim' => 'Are you sure you want to cancel?',
33 - 'successfulupload' => 'Upload successful',
34 - 'uploaderror' => 'Upload error',
35 - 'uploadwarning' => 'Upload warning',
36 - 'unknown-error' => 'Unknown error:',
37 - 'return-to-form' => 'Return to form',
38 - 'file-exists-duplicate' => 'This file is a duplicate of the following file:',
39 - 'fileexists' => 'A file with this name exists already. Please check <b><tt>$1</tt></b> if you are not sure if you want to change it.',
40 - 'fileexists-thumb' => '<center><b>Existing file</b></center>',
41 - 'ignorewarning' => 'Ignore warning and save file anyway',
42 - 'file-thumbnail-no' => 'The filename begins with <b><tt>$1</tt></b>',
43 - 'go-to-resource' => 'Go to resource page',
44 - 'upload-misc-error' => 'Unknown upload error',
45 - 'wgfogg_waring_bad_extension' => 'You have selected a file with an unsuported extension (<a href="http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types">more information</a>).',
46 - 'cancel-button' => 'Cancel',
47 - 'ok-button' => 'OK',
 23+ 'mwe-upload-transcode-in-progress' => 'Transcode and upload in progress (do not close this window)',
 24+ 'mwe-upload-in-progress' => 'Upload in progress (do not close this window)',
 25+ 'mwe-upload-transcoded-status' => 'Transcoded',
 26+ 'mwe-uploaded-status' => 'Uploaded',
 27+ 'mwe-upload-stats-fileprogres' => '$1 of $2',
 28+ 'mwe-upload_completed' => 'Your upload is complete',
 29+ 'mwe-upload_done' => '<a href="$1">Your upload <i>should be</i> accessible</a>.',
 30+ 'mwe-upload-unknown-size' => 'Unknown size',
 31+ 'mwe-cancel-confim' => 'Are you sure you want to cancel?',
 32+ 'mwe-successfulupload' => 'Upload successful',
 33+ 'mwe-uploaderror' => 'Upload error',
 34+ 'mwe-uploadwarning' => 'Upload warning',
 35+ 'mwe-unknown-error' => 'Unknown error:',
 36+ 'mwe-return-to-form' => 'Return to form',
 37+ 'mwe-file-exists-duplicate' => 'This file is a duplicate of the following file:',
 38+ 'mwe-fileexists' => 'A file with this name exists already. Please check <b><tt>$1</tt></b> if you are not sure if you want to change it.',
 39+ 'mwe-fileexists-thumb' => '<center><b>Existing file</b></center>',
 40+ 'mwe-ignorewarning' => 'Ignore warning and save file anyway',
 41+ 'mwe-file-thumbnail-no' => 'The filename begins with <b><tt>$1</tt></b>',
 42+ 'mwe-go-to-resource' => 'Go to resource page',
 43+ 'mwe-upload-misc-error' => 'Unknown upload error',
 44+ 'mwe-wgfogg_warning_bad_extension' => 'You have selected a file with an unsuported extension (<a href="http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types">more information</a>).',
 45+ 'mwe-cancel-button' => 'Cancel',
 46+ 'mwe-ok-button' => 'OK',
4847
4948 /*
5049 * js file: /libAddMedia/mvAdvFirefogg.js
@@ -221,7 +220,7 @@
222221 'mv_generic_missing_plugin' => 'You browser does not appear to support the following playback type: <b>$1</b><br />Visit the <a href="http://commons.wikimedia.org/wiki/Commons:Media_help">Playback Methods</a> page to download a player.<br />',
223222 'mv_for_best_experience' => 'For a better video playback experience we recommend:<br /><b><a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=mwEmbed">Firefox 3.5</a>.</b>',
224223 'mv_do_not_warn_again' => 'Dissmiss for now.',
225 - 'players' => 'Players',
 224+ 'playerselect' => 'Players',
226225
227226 /*
228227 * js file: /libClipEdit/mvClipEdit.js
@@ -251,10 +250,10 @@
252251 /*
253252 * js file: /mv_embed.js
254253 */
255 - 'loading_txt' => 'loading <blink>...</blink>',
256 - 'loading_title' => 'Loading...',
257 - 'size-gigabytes' => '$1 GB',
258 - 'size-megabytes' => '$1 MB',
259 - 'size-kilobytes' => '$1 K',
260 - 'size-bytes' => '$1 B',
 254+ 'mwe-loading_txt' => 'loading <blink>...</blink>',
 255+ 'mwe-loading_title' => 'Loading...',
 256+ 'mwe-size-gigabytes' => '$1 GB',
 257+ 'mwe-size-megabytes' => '$1 MB',
 258+ 'mwe-size-kilobytes' => '$1 K',
 259+ 'mwe-size-bytes' => '$1 B',
261260 );
Index: trunk/phase3/js2/mwEmbed/mv_embed.js
@@ -79,12 +79,12 @@
8080
8181 //all default msg in [English] should be overwritten by the CMS language msg system.
8282 loadGM({
83 - "loading_txt" : "loading <blink>...<\/blink>",
84 - "loading_title" : "Loading...",
85 - "size-gigabytes" : "$1 GB",
86 - "size-megabytes" : "$1 MB",
87 - "size-kilobytes" : "$1 K",
88 - "size-bytes" : "$1 B"
 83+ "mwe-loading_txt" : "loading <blink>...<\/blink>",
 84+ "mwe-loading_title" : "Loading...",
 85+ "mwe-size-gigabytes" : "$1 GB",
 86+ "mwe-size-megabytes" : "$1 MB",
 87+ "mwe-size-kilobytes" : "$1 K",
 88+ "mwe-size-bytes" : "$1 B"
8989 });
9090
9191 /**
@@ -299,15 +299,15 @@
300300 round = 2;
301301 if( size > 1024 ) {
302302 size = size / 1024;
303 - msg = 'size-gigabytes';
 303+ msg = 'mwe-size-gigabytes';
304304 } else {
305 - msg = 'size-megabytes';
 305+ msg = 'mwe-size-megabytes';
306306 }
307307 } else {
308 - msg = 'size-kilobytes';
 308+ msg = 'mwe-size-kilobytes';
309309 }
310310 } else {
311 - msg = 'size-bytes';
 311+ msg = 'mwe-size-bytes';
312312 }
313313 //javascript does not let you do precession points in rounding
314314 var p = Math.pow(10,round);
@@ -535,7 +535,7 @@
536536
537537 //make sure we have jQuery
538538 _this.jQueryCheck(function(){
539 - $j('.videonojs').html( gM('loading_txt') );
 539+ $j('.videonojs').html( gM('mwe-loading_txt') );
540540 var depReq = [
541541 [
542542 '$j.ui',
@@ -748,7 +748,7 @@
749749 (function($) {
750750 $.fn.addMediaWiz = function( iObj, callback ){
751751 //first set the cursor for the button to "loading"
752 - $j(this.selector).css('cursor','wait').attr('title', gM('loading_title'));
 752+ $j(this.selector).css('cursor','wait').attr('title', gM('mwe-loading_title'));
753753
754754 iObj['target_invocation'] = this.selector;
755755
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -6,8 +6,8 @@
77 "loading_plugin" : "loading plugin <blink>...<\/blink>",
88 "select_playback" : "Set playback preference",
99 "link_back" : "Link back",
10 - "error_load_lib" : "Error : mv_embed was unable to load required JavaScript libraries.\nInsert script via DOM has failed. Please try reloading this page.",
11 - "error_swap_vid" : "Error : mv_embed was unable to swap the video tag for the mv_embed interface",
 10+ "error_load_lib" : "Error: mv_embed was unable to load required JavaScript libraries.\nInsert script via DOM has failed. Please try reloading this page.",
 11+ "error_swap_vid" : "Error: mv_embed was unable to swap the video tag for the mv_embed interface",
1212 "add_to_end_of_sequence" : "Add to end of sequence",
1313 "missing_video_stream" : "The video file for this stream is missing",
1414 "play_clip" : "Play clip",
@@ -20,11 +20,11 @@
2121 "prev_clip_msg" : "Play previous clip",
2222 "current_clip_msg" : "Continue playing this clip",
2323 "seek_to" : "Seek to",
24 - "download_segment" : "Download selection : ",
25 - "download_full" : "Download full video file : ",
 24+ "download_segment" : "Download selection:",
 25+ "download_full" : "Download full video file:",
2626 "download_right_click" : "To download, right click and select <i>Save target as...<\/i>",
2727 "download_clip" : "Download video",
28 - "download_text" : "Download text (<a style=\"color : white\" title=\"cmml\" href=\"http : \/\/wiki.xiph.org\/index.php\/CMML\">CMML<\/a> xml) : ",
 28+ "download_text" : "Download text (<a style=\"color:white\" title=\"cmml\" href=\"http:\/\/wiki.xiph.org\/index.php\/CMML\">CMML<\/a> xml):",
2929 "download" : "Download",
3030 "share" : "Share",
3131 "credits" : "Credits",
@@ -44,8 +44,8 @@
4545 "mv_ogg-player-flowplayer" : "Flowplayer",
4646 "mv_ogg-player-selected" : " (selected)",
4747 "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
48 - "mv_generic_missing_plugin" : "You browser does not appear to support the following playback type : <b>$1<\/b><br \/>Visit the <a href=\"http : \/\/commons.wikimedia.org\/wiki\/Commons : Media_help\">Playback Methods<\/a> page to download a player.<br \/>",
49 - "mv_for_best_experience" : "For a better video playback experience we recommend : <br \/><b><a href=\"http : \/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">Firefox 3.5<\/a>.<\/b>",
 48+ "mv_generic_missing_plugin" : "You browser does not appear to support the following playback type: <b>$1<\/b><br \/>Visit the <a href=\"http:\/\/commons.wikimedia.org\/wiki\/Commons:Media_help\">Playback Methods<\/a> page to download a player.<br \/>",
 49+ "mv_for_best_experience" : "For a better video playback experience we recommend:<br \/><b><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">Firefox 3.5<\/a>.<\/b>",
5050 "mv_do_not_warn_again" : "Dissmiss for now.",
5151 "playerselect" : "Players"
5252 });
@@ -1552,7 +1552,7 @@
15531553 function(){
15541554 //animation done.. add "loading" to div if empty
15551555 if($j('#liks_info_'+_this.id).html()==''){
1556 - $j('#liks_info_'+_this.id).html(gM('loading_txt'));
 1556+ $j('#liks_info_'+_this.id).html(gM('mwe-loading_txt'));
15571557 }
15581558 }
15591559 )
@@ -1968,7 +1968,7 @@
19691969 doLinkBack:function(){
19701970 if(this.roe && this.media_element.addedROEData==false){
19711971 var _this = this;
1972 - this.displayHTML(gM('loading_txt'));
 1972+ this.displayHTML(gM('mwe-loading_txt'));
19731973 do_request(this.roe, function(data)
19741974 {
19751975 _this.media_element.addROE(data);
@@ -2023,7 +2023,7 @@
20242024 'height:'+ parseInt( this.height )+'px;width:400px;' +
20252025 'display:none;" ' +
20262026 'id="metaBox_' + this.id + '">'+
2027 - gM('loading_txt') +
 2027+ gM('mwe-loading_txt') +
20282028 '</div>');
20292029 }
20302030 //fade in the text display
@@ -2195,7 +2195,7 @@
21962196 //js_log('f:showVideoDownload '+ this.roe + ' ' + this.media_element.addedROEData);
21972197 if(this.roe && this.media_element.addedROEData == false){
21982198 var _this = this;
2199 - this.displayHTML(gM('loading_txt'));
 2199+ this.displayHTML(gM('mwe-loading_txt'));
22002200 do_request(this.roe, function(data)
22012201 {
22022202 _this.media_element.addROE(data);
Index: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -222,7 +222,7 @@
223223 'right:0px;bottom:0px;' +
224224 'height:'+(this.pe.height-30)+
225225 'px;overflow:auto;"><span style="display:none;" id="mv_txt_load_' + this.pe.id + '">'+
226 - gM('loading_txt')+'</span>' +
 226+ gM('mwe-loading_txt')+'</span>' +
227227 '</div>';
228228 },
229229 getTsSelect:function(){
Index: trunk/phase3/js2/uploadPage.js
@@ -1,9 +1,9 @@
22 /*
33 * uploadPage.js to be run on specialUpload page.
4 - * controls the invocation of the mvUploader class based on local config.
5 - */
 4+ * controls the invocation of the mvUploader class based on local config.
 5+ */
66 js2AddOnloadHook( function(){
7 - mwUploadHelper.init();
 7+ mwUploadHelper.init();
88 });
99 var mwUploadFormTarget = '#mw-upload-form';
1010 //set up the upoload form bindings once all dom manipluation is done
@@ -11,18 +11,18 @@
1212 firefogg_installed:false,
1313 init:function(){
1414 var _this = this;
15 - //if not boolean false set to true:
 15+ //if not boolean false set to true:
1616 if(typeof wgEnableFirefogg == 'undefined')
1717 wgEnableFirefogg = true;
18 -
 18+
1919 if( wgEnableFirefogg ){
20 - //setup the upload handler to firefogg (supports our upload proccess) (should work with the http uploads too)
21 - $j('#wpUploadFile').firefogg({
 20+ //setup the upload handler to firefogg (supports our upload proccess) (should work with the http uploads too)
 21+ $j('#wpUploadFile').firefogg({
2222 //an api url (we won't submit directly to action of the form)
2323 'api_url' : wgServer + wgScriptPath + '/api.php',
24 - 'form_rewrite': true,
25 - 'target_edit_from' : mwUploadFormTarget,
26 - 'new_source_cb' : function( orgFilename, oggName ){
 24+ 'form_rewrite': true,
 25+ 'target_edit_from' : mwUploadFormTarget,
 26+ 'new_source_cb' : function( orgFilename, oggName ){
2727 if($j('#wpDestFile').val() == "")
2828 $j('#wpDestFile').val( oggName );
2929 mwUploadHelper.doDestCheck();
@@ -34,79 +34,79 @@
3535 _this.firefogg_installed=false;
3636 }
3737 }
38 - });
39 -
40 - }else{
41 - //Add basic upload profile support ( http status monitoring, progress box for browsers that support it etc.)
 38+ });
 39+
 40+ }else{
 41+ //Add basic upload profile support ( http status monitoring, progress box for browsers that support it etc.)
4242 if($j('#wpUploadFileURL').length != 0){
43 - $j('#wpUploadFileURL').baseUploadInterface({
 43+ $j('#wpUploadFileURL').baseUploadInterface({
4444 'api_url' : wgServer + wgScriptPath + '/api.php',
4545 'target_edit_from' : mwUploadFormTarget
46 - });
 46+ });
4747 }
4848 }
49 -
 49+
5050 if( wgAjaxUploadDestCheck ){
51 - //do destination check:
 51+ //do destination check:
5252 $j('#wpDestFile').change( mwUploadHelper.doDestCheck );
5353 }
54 -
 54+
5555 //check if we have http enabled & setup enable/disable toggle:
56 - if($j('#wpUploadFileURL').length != 0){
57 - //set the initial toggleUpType
58 - _this.toggleUpType(true);
59 -
60 - $j("input[name='wpSourceType']").click(function(){
 56+ if($j('#wpUploadFileURL').length != 0){
 57+ //set the initial toggleUpType
 58+ _this.toggleUpType(true);
 59+
 60+ $j("input[name='wpSourceType']").click(function(){
6161 _this.toggleUpType( this.id == 'wpSourceTypeFile' );
62 - });
63 - }
64 - $j('#wpUploadFile,#wpUploadFileURL').focus(function(){
65 - _this.toggleUpType( this.id == 'wpUploadFile' );
66 - }).change(function(){ //also setup the onChange event binding:
 62+ });
 63+ }
 64+ $j('#wpUploadFile,#wpUploadFileURL').focus(function(){
 65+ _this.toggleUpType( this.id == 'wpUploadFile' );
 66+ }).change(function(){ //also setup the onChange event binding:
6767 if ( wgUploadAutoFill ) {
68 - mwUploadHelper.doDestinationFill( this );
69 - }
70 - });
 68+ mwUploadHelper.doDestinationFill( this );
 69+ }
 70+ });
7171 },
7272 /**
7373 * toggleUpType sets the upload radio buttons
74 - *
75 - * boolean set
76 - */
 74+ *
 75+ * boolean set
 76+ */
7777 toggleUpType:function( set ){
7878 $j('#wpSourceTypeFile').attr('checked', set);
7979 $j('#wpUploadFile').attr('disabled', !set);
80 -
 80+
8181 $j('#wpSourceTypeURL').attr('checked', !set);
8282 $j('#wpUploadFileURL').attr('disabled', set);
83 -
84 - //if firefogg is enbaled: toggle action per form select of http upload vs firefogg upload
 83+
 84+ //if firefogg is enbaled: toggle action per form select of http upload vs firefogg upload
8585 if( wgEnableFirefogg ){
8686 $j('#wpUploadFile').firefogg({
8787 'firefogg_form_action': $j('#wpSourceTypeFile').attr('checked')
8888 });
8989 }
90 - },
 90+ },
9191 /**
9292 * doDestCheck checks the destination
9393 */
94 - doDestCheck:function(){
 94+ doDestCheck:function(){
9595 var _this = this;
9696 $j('#wpDestFile-warning').empty();
9797 //show loading
9898 $j('#wpDestFile').after('<img id = "mw-spinner-wpDestFile" src ="'+ stylepath + '/common/images/spinner.gif" />');
99 - //try and get a thumb of the current file (check its destination)
 99+ //try and get a thumb of the current file (check its destination)
100100 do_api_req({
101 - 'data':{
 101+ 'data':{
102102 'titles': 'File:' + $j('#wpDestFile').val(),//@@todo we may need a more clever way to get a the filename
103103 'prop': 'imageinfo',
104104 'iiprop':'url|mime|size',
105 - 'iiurlwidth': 150
 105+ 'iiurlwidth': 150
106106 },
107107 'url': _this.api_url
108108 },function(data){
109109 //remove spinner:
110 - $j('#mw-spinner-wpDestFile').remove();
 110+ $j('#mw-spinner-wpDestFile').remove();
111111 if(data && data.query && data.query.pages){
112112 if( data.query.pages[-1] ){
113113 //all good no file there
@@ -116,12 +116,12 @@
117117 var ntitle = data.query.normalized[0].to;
118118 }else{
119119 var ntitle = data.query.pages[ page_id ].title;
120 - }
121 - var img = data.query.pages[ page_id ].imageinfo[0];
 120+ }
 121+ var img = data.query.pages[ page_id ].imageinfo[0];
122122 $j('#wpDestFile-warning').html(
123123 '<ul>' +
124124 '<li>'+
125 - gM('fileexists', ntitle) +
 125+ gM('mwe-fileexists', ntitle) +
126126 '</li>'+
127127 '<div class="thumb tright">' +
128128 '<div style="width: ' + ( parseInt(img.thumbwidth)+2 ) + 'px;" class="thumbinner">' +
@@ -137,7 +137,7 @@
138138 'src="' + stylepath + "/common/images/magnify-clip.png\" />" +
139139 '</a>'+
140140 '</div>'+
141 - gM('fileexists-thumb') +
 141+ gM('mwe-fileexists-thumb') +
142142 '</div>' +
143143 '</div>'+
144144 '</div>' +
@@ -146,16 +146,16 @@
147147 }
148148 }
149149 }
150 - });
 150+ });
151151 },
152152 /**
153 - * doDestinationFill fills in a destination file-name based on a source asset name.
 153+ * doDestinationFill fills in a destination file-name based on a source asset name.
154154 */
155155 doDestinationFill:function( targetElm ){
156156 js_log("doDestinationFill")
157157 //remove any previously flagged errors
158 - $j('#mw-upload-permitted,#mw-upload-prohibited').hide();
159 -
 158+ $j('#mw-upload-permitted,#mw-upload-prohibited').hide();
 159+
160160 var path = $j(targetElm).val();
161161 // Find trailing part
162162 var slash = path.lastIndexOf('/');
@@ -167,13 +167,13 @@
168168 fname = path.substring(slash+1, 10000);
169169 } else {
170170 fname = path.substring(backslash+1, 10000);
171 - }
 171+ }
172172 //urls are less likely to have a usefull extension don't include them in the extention check
173 - if( wgFileExtensions && $j(targetElm).attr('id') != 'wpUploadFileURL' ){
174 - var found = false;
175 - if( fname.lastIndexOf('.')!=-1 ){
176 - var ext = fname.substr( fname.lastIndexOf('.')+1 );
177 - for(var i=0; i < wgFileExtensions.length; i++){
 173+ if( wgFileExtensions && $j(targetElm).attr('id') != 'wpUploadFileURL' ){
 174+ var found = false;
 175+ if( fname.lastIndexOf('.')!=-1 ){
 176+ var ext = fname.substr( fname.lastIndexOf('.')+1 );
 177+ for(var i=0; i < wgFileExtensions.length; i++){
178178 if( wgFileExtensions[i].toLowerCase() == ext.toLowerCase() )
179179 found = true;
180180 }
@@ -181,19 +181,19 @@
182182 if(!found){
183183 //clear the upload set mw-upload-permitted to error
184184 $j(targetElm).val('');
185 - $j('#mw-upload-permitted,#mw-upload-prohibited').show().addClass('error');
186 - //clear the wpDestFile as well:
187 - $j('#wpDestFile').val('');
 185+ $j('#mw-upload-permitted,#mw-upload-prohibited').show().addClass('error');
 186+ //clear the wpDestFile as well:
 187+ $j('#wpDestFile').val('');
188188 return false;
189 - }
190 - }
 189+ }
 190+ }
191191 // Capitalise first letter and replace spaces by underscores
192 - fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
 192+ fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
193193 // Output result
194194 $j('#wpDestFile').val( fname );
195 -
196 - //do a destination check
 195+
 196+ //do a destination check
197197 this.doDestCheck();
198198 }
199199 }
200 -
 200+

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55296* language updates and fixes/enhancements to js/php merge systemdale00:28, 19 August 2009

Status & tagging log