Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js |
— | — | @@ -2,6 +2,13 @@ |
3 | 3 | * Kaltura aggregated search: |
4 | 4 | */ |
5 | 5 | |
| 6 | +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' |
| 11 | +} ); |
| 12 | + |
6 | 13 | var kalturaFilters = function ( options ) { |
7 | 14 | return this.init( options ); |
8 | 15 | } |
— | — | @@ -25,16 +32,18 @@ |
26 | 33 | |
27 | 34 | this.filterList = {}; |
28 | 35 | |
29 | | - this.buildFilter('media', 'Media', { |
30 | | - movie: 'Videos', |
31 | | - image: 'Images' |
| 36 | + this.buildFilter('media', |
| 37 | + gM( 'rsd-media-filter-title' ), { |
| 38 | + movie: gM ( 'rsd-media-filter-videos' ), |
| 39 | + image: gM ( 'rsd-media-filter-images' ) |
32 | 40 | }); |
33 | 41 | |
34 | | - this.buildFilter('providers', 'Providers', { |
35 | | - wiki_commons: 'Wikipedia Commons', |
36 | | - archive_org: 'The Internet Archive', |
37 | | - metavid: 'Metavid', |
38 | | - flickr: 'Flickr' |
| 42 | + this.buildFilter('providers', |
| 43 | + gM( 'rsd-provider-filter-title' ), { |
| 44 | + wiki_commons: gM( 'rsd-wiki_commons-title'), |
| 45 | + archive_org: gM( 'rsd-archive_org-title' ), |
| 46 | + metavid: gM( 'rsd-metavid-title' ), |
| 47 | + flickr: gM( 'rsd-flickr-title' ) |
39 | 48 | }); |
40 | 49 | |
41 | 50 | }, |
— | — | @@ -263,6 +272,10 @@ |
264 | 273 | var fileExtension = _this.getMimeExtension( result[ 'mime' ] ); |
265 | 274 | result[ 'titleKey' ] = result[ 'titleKey' ] || ( result[ 'title' ] + '.' + fileExtension ); |
266 | 275 | |
| 276 | + if ( result.license_url ) { |
| 277 | + result[ 'license' ] = this.rsd.getLicenseFromUrl( result.license_url ); |
| 278 | + } |
| 279 | + |
267 | 280 | this.num_results++; |
268 | 281 | _this.resultsObj[ resource_id ] = result; |
269 | 282 | |