r62054 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62053‎ | r62054 | r62055 >
Date:00:20, 6 February 2010
Author:dale
Status:deferred
Tags:
Comment:
* merged messages from js to php via maintenance script
* updated kalturaSearch messages to "json" formated
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/includes/languages/mwEmbed.i18n.php (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/jsScriptLoader.php (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.BaseUploadInterface.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/includes/languages/mwEmbed.i18n.php
@@ -160,6 +160,7 @@
161161 'mwe-credits' => 'Credits',
162162 'mwe-clip_linkback' => 'Clip source page',
163163 'mwe-chose_player' => 'Choose video player',
 164+ 'mwe-no-player' => 'No player available for $1',
164165 'mwe-share_this_video' => 'Share this video',
165166 'mwe-video_credits' => 'Video credits',
166167 'mwe-menu_btn' => 'Menu',
@@ -291,6 +292,14 @@
292293 'mwe-stream_title' => '$1 $2 to $3',
293294
294295 /*
 296+ * js file: /modules/AddMedia/searchLibs/kalturaSearch.js
 297+ */
 298+ 'rsd-media-filter-title' => 'Media',
 299+ 'rsd-media-filter-videos' => 'Videos',
 300+ 'rsd-media-filter-images' => 'Images',
 301+ 'rsd-provider-filter-title' => 'Providers',
 302+
 303+ /*
295304 * js file: /modules/AddMedia/searchLibs/baseRemoteSearch.js
296305 */
297306 'mwe-imported_from' => '$1 imported from [$2 $3]. See the original [$4 resource page] for more information.',
@@ -351,6 +360,7 @@
352361 'mwe-return-search-results' => 'Return to search results',
353362 'mwe-importing_asset' => 'Importing asset',
354363 'mwe-preview_insert_resource' => 'Preview insert of resource: $1',
 364+ 'mwe-do-more-modification' => 'Do More Modification',
355365 'mwe-checking-resource' => 'Checking for resource',
356366 'mwe-resource-needs-import' => 'Resource $1 needs to be imported to $2',
357367 'mwe-ftype-svg' => 'SVG vector file',
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js
@@ -3,10 +3,10 @@
44 */
55
66 mw.addMessages( {
7 - 'rsd-media-filter-title': 'Media',
8 - 'rsd-media-filter-videos': 'Videos',
9 - 'rsd-media-filter-images': 'Images',
10 - 'rsd-provider-filter-title': 'Providers'
 7+ "rsd-media-filter-title": "Media",
 8+ "rsd-media-filter-videos": "Videos",
 9+ "rsd-media-filter-images": "Images",
 10+ "rsd-provider-filter-title": "Providers"
1111 } );
1212
1313 var kalturaFilters = function ( options ) {
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.BaseUploadInterface.js
@@ -390,16 +390,10 @@
391391 mw.log( 'mvBaseUploadInterface.doApiCopyUpload' );
392392 mw.log( 'doHttpUpload (no form submit) ' );
393393
394 - //Special case of upload.js commons hack:
395 - var comment_value = $j( '#wpUploadDescription' ).val();
396 - if( comment_value == '' ){
397 - comment_value = $j( "[name='wpUploadDescription']").val();
398 - }
399 -
400394 var httpUpConf = {
401395 'url' : $j( '#wpUploadFileURL' ).val(),
402396 'filename' : $j( '#wpDestFile' ).val(),
403 - 'comment' : comment_value,
 397+ 'comment' : this.getUploadDescription(),
404398 'watch' : ( $j( '#wpWatchthis' ).is( ':checked' ) ) ? 'true' : 'false',
405399 'ignorewarnings': ($j('#wpIgnoreWarning' ).is( ':checked' ) ) ? 'true' : 'false'
406400 }
@@ -407,6 +401,23 @@
408402 this.editToken = $j( "#wpEditToken" ).val();
409403 this.doHttpUpload( httpUpConf );
410404 },
 405+
 406+ /**
 407+ * Get the upload description, append the licence if avaliable
 408+ *
 409+ * NOTE: wpUploadDescription should be a configuration option.
 410+ *
 411+ * @return {String}
 412+ * value of wpUploadDescription
 413+ */
 414+ getUploadDescription: function(){
 415+ //Special case of upload.js commons hack:
 416+ var comment_value = $j( '#wpUploadDescription' ).val();
 417+ if( comment_value == '' ){
 418+ comment_value = $j( "[name='wpUploadDescription']").val();
 419+ }
 420+ //check for licence tag:
 421+ },
411422
412423 /**
413424 * Process the result of the form submission, returned to an iframe.
Index: branches/js2-work/phase3/js/mwEmbed/jsScriptLoader.php
@@ -736,7 +736,7 @@
737737 return "\n/*
738738 * Could not parse JSON language messages in this file,
739739 * Please check that mw.addMessages call contains valid JSON (not javascript)
740 -*/\n\n" . $json_str; //include the original fallback msg string
 740+*/\n\n{" . $json_str . "\n}"; //include the original fallback msg string
741741 }
742742 }
743743 }

Status & tagging log