From 4e081a955938204779572e60660212c54f330251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Sat, 19 Apr 2014 00:26:55 +0000 Subject: [PATCH] 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 --- resources/mmv/ui/mmv.ui.metadataPanel.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index ac41b14a3..639e1de20 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -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 {