mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-28 01:50:09 +00:00
Use short license name from template if we don't recognize it
We have been saying 'view terms' for every non-CC/PD image, which is not particularly helpful. Change-Id: Ia5fc6fb3af3802ad8a1f5188226fe4e89ab6d8d9 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/472
This commit is contained in:
parent
c1b2b1bb2c
commit
4e081a9559
|
@ -546,15 +546,10 @@
|
|||
* @param {string} filePageUrl URL of the file description page
|
||||
*/
|
||||
MPP.setLicense = function ( license, filePageUrl ) {
|
||||
var message, shortName, url, isCc;
|
||||
var shortName, url, isCc;
|
||||
|
||||
if ( license ) {
|
||||
message = 'multimediaviewer-license-' + ( license.internalName || '' );
|
||||
if ( mw.messages.exists( message ) ) {
|
||||
shortName = mw.message( message ).text();
|
||||
} else {
|
||||
shortName = mw.message( 'multimediaviewer-license-default' ).text();
|
||||
}
|
||||
shortName = license.getShortName();
|
||||
url = license.deedUrl || filePageUrl;
|
||||
isCc = license.isCc();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue