r55488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55487‎ | r55488 | r55489 >
Date:19:12, 22 August 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Update messages and formatting
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -1,12 +1,13 @@
22 /*
3 -* a library for doing remote media searches
4 -*
5 -* initial targeted archives are:
 3+ * a library for doing remote media searches
 4+ *
 5+ * initial targeted archives are:
66 the local wiki
77 wikimedia commons
88 metavid
99 and archive.org
10 -*/
 10+ */
 11+
1112 loadGM({
1213 "mwe-add_media_wizard" : "Add media wizard",
1314 "mwe-media_search" : "Media search",
@@ -17,7 +18,7 @@
1819 "rsd_results_prev" : "previous",
1920 "rsd_no_results" : "No search results for <b>$1<\/b>",
2021 "mwe-upload_tab" : "Upload",
21 - "rsd_layout" : "Layout : ",
 22+ "rsd_layout" : "Layout:",
2223 "rsd_resource_edit" : "Edit resource: $1",
2324 "mwe-resource_description_page" : "Resource description page",
2425 "rsd_local_resource_title" : "Local resource title",
@@ -29,7 +30,7 @@
3031 "mwe-cc_sa_title" : "Share Alike",
3132 "mwe-cc_pd_title" : "Public Domain",
3233 "mwe-unknown_license" : "Unknown license",
33 - "mwe-no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<\/p><p>Do you need to login?<\/p><p>If permissions are set, you may have to enable $wgAllowCopyUploads (<a href=\"http : \/\/www.mediawiki.org\/wiki\/Manual : $wgAllowCopyUploads\">more information<\/a>).<\/p>",
 34+ "mwe-no_import_by_url" : "This user or wiki <b>can not<\/b> import assets from remote URLs.<\/p><p>Do you need to login?<\/p><p>If permissions are set, you may have to enable $wgAllowCopyUploads (<a href=\"http : \/\/www.mediawiki.org\/wiki\/Manual:$wgAllowCopyUploads\">more information<\/a>).<\/p>",
3435 "mwe-results_from" : "Results from <a href=\"$1\" target=\"_new\" >$2<\/a>",
3536 "mwe-missing_desc_see_source" : "This asset is missing a description. Please see the [$1 orginal source] and help describe it.",
3637 "rsd_config_error" : "Add media wizard configuration error: $1",
@@ -47,6 +48,7 @@
4849 "mwe-importing_asset" : "Importing asset",
4950 "mwe-preview_insert_resource" : "Preview insert of resource: $1"
5051 });
 52+
5153 var default_remote_search_options = {
5254 'profile':'mediawiki_edit',
5355 'target_container':null, //the div that will hold the search interface
@@ -77,6 +79,7 @@
7880 'enable_upload_tab':true, // if we want to enable an uploads tab:
7981 'upload_api_target' : 'http://localhost/wiki_trunk/api.php' // can be local or the url of the upload api.
8082 }
 83+
8184 if(typeof wgServer == 'undefined')
8285 wgServer = '';
8386 if(typeof wgScriptPath == 'undefined')
@@ -85,8 +88,8 @@
8689 stylepath = '';
8790
8891 /*
89 -* base remoteSearch Driver interface
90 -*/
 92+ * base remoteSearch Driver interface
 93+ */
9194 var remoteSearchDriver = function(iObj){
9295 return this.init( iObj );
9396 }
@@ -136,7 +139,7 @@
137140 @local : if the content provider assets need to be imported or not.
138141 @local_domains : sets of domains for which the content is local
139142 //@@todo should query wgForeignFileRepos setting maybe interwikimap from the api
140 - */
 143+ */
141144 'this_wiki':{
142145 'enabled': 1,
143146 'checked': 1,
@@ -249,9 +252,9 @@
250253 }
251254 },
252255 /*
253 - * getlicenseImgSet
254 - * @param license_key the license key (ie "by-sa" or "by-nc-sa" etc)
255 - */
 256+ * getlicenseImgSet
 257+ * @param license_key the license key (ie "by-sa" or "by-nc-sa" etc)
 258+ */
256259 getlicenseImgSet: function( licenseObj ){
257260 //js_log('output images: '+ imgs);
258261 return '<div class="rsd_license" title="'+ licenseObj.title + '" >' +
@@ -262,9 +265,9 @@
263266 '</div>';
264267 },
265268 /*
266 - * getLicenceKeyFromKey
267 - * @param license_key the key of the license (must be defined in: this.licenses.cc.licenses)
268 - */
 269+ * getLicenceKeyFromKey
 270+ * @param license_key the key of the license (must be defined in: this.licenses.cc.licenses)
 271+ */
269272 getLicenceFromKey:function( license_key , force_url){
270273 if( typeof( this.licenses.cc.licenses[ license_key ]) == 'undefined')
271274 return js_error('could not find:' + license_key);
@@ -288,9 +291,9 @@
289292 };
290293 },
291294 /*
292 - * getLicenceKeyFromUrl
293 - * @param licence_url the url of the license
294 - */
 295+ * getLicenceKeyFromUrl
 296+ * @param licence_url the url of the license
 297+ */
295298 getLicenceFromUrl: function( license_url ){
296299 //js_log("getLicenceFromUrl::" + license_url);
297300 //first do a direct lookup check:
@@ -768,10 +771,10 @@
769772 }
770773 },
771774 /*
772 - * checkForCopyURLPermission:
773 - * not really nessesary the api request to upload will return apopprirate error if the user lacks permission. or $wgAllowCopyUploads is set to false
774 - * (use this function if we want to issue a warning up front)
775 - */
 775+ * checkForCopyURLPermission:
 776+ * not really nessesary the api request to upload will return apopprirate error if the user lacks permission. or $wgAllowCopyUploads is set to false
 777+ * (use this function if we want to issue a warning up front)
 778+ */
776779 checkForCopyURLPermission:function( callback ){
777780 var _this = this;
778781 //do api check:

Status & tagging log