[MediaWiki-commits] [Gerrit] mediawiki...MultimediaViewer[master]: Shorten clickable link text in HTML credit lines
jenkins-bot has submitted this change and it was merged. Change subject: Shorten clickable link text in HTML credit lines .. Shorten clickable link text in HTML credit lines Previously, the clickable text in the generated HTML credit lines was the entire link to the article. This is shortened to a localized version of "Link". Bug: T119686 Change-Id: I708f65a85bfa26c264cdd06a265096027266240c --- M extension.json M i18n/en.json M i18n/qqq.json M resources/mmv/mmv.EmbedFileFormatter.js M tests/qunit/mmv/mmv.EmbedFileFormatter.test.js 5 files changed, 9 insertions(+), 6 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index f4b1b20..0beefd2 100644 --- a/extension.json +++ b/extension.json @@ -232,7 +232,8 @@ "multimediaviewer-text-embed-credit-text-l", "multimediaviewer-html-embed-credit-text-bl", "multimediaviewer-html-embed-credit-text-b", - "multimediaviewer-html-embed-credit-text-l" + "multimediaviewer-html-embed-credit-text-l", + "multimediaviewer-html-embed-credit-link-text" ] }, "mmv.ui.download.pane": { diff --git a/i18n/en.json b/i18n/en.json index 17fc6f2..e7d7ac5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -96,6 +96,7 @@ "multimediaviewer-html-embed-credit-text-bl": "By $1, $2, $3", "multimediaviewer-html-embed-credit-text-b": "By $1, $2", "multimediaviewer-html-embed-credit-text-l": "$1, $2", + "multimediaviewer-html-embed-credit-link-text": "Link", "multimediaviewer-embed-byline": "By $1", "multimediaviewer-embed-license": "Licensed under $1.", "multimediaviewer-embed-license-nonfree": "$1.", diff --git a/i18n/qqq.json b/i18n/qqq.json index dda5c8e..bc0d0d3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -105,6 +105,7 @@ "multimediaviewer-html-embed-credit-text-bl": "Credit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - name of the author\n* $2 - copyright tag (usually a license)\n* $3 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-html-embed-credit-text-b": "Credit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - name of the author\n* $2 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-html-embed-credit-text-l": "{{optional}}\nCredit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - copyright tag (usually a license)\n* $2 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", + "multimediaviewer-html-embed-credit-link-text": "The clickable text of a link in a credit line, used when generating HTML to reuse an image.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-embed-byline": "Byline (author credit) text, used when generating wikitext/HTML to reuse the image. $1 is author name.\n{{Identical|By}}", "multimediaviewer-embed-license": "License information, used when generating wikitext/HTML to reuse the image. $1 is the license name.", "multimediaviewer-embed-license-nonfree": "Like {{msg-mw|multimediaviewer-embed-license}}, but for non-free images (where $1 is typically not a license name but something like \"Fair use\").", diff --git a/resources/mmv/mmv.EmbedFileFormatter.js b/resources/mmv/mmv.EmbedFileFormatter.js index 0756238..e0cdc06 100644 --- a/resources/mmv/mmv.EmbedFileFormatter.js +++ b/resources/mmv/mmv.EmbedFileFormatter.js @@ -163,7 +163,7 @@ EFFP.getCreditHtml = function ( info ) { var creditText, creditParams, shortURL = info.imageInfo.descriptionShortUrl, - shortLink = this.htmlUtils.makeLinkText( shortURL, { href: shortURL } ), + shortLink = this.htmlUtils.makeLinkText( mw.message(
[MediaWiki-commits] [Gerrit] mediawiki...MultimediaViewer[master]: Shorten clickable link text in HTML credit lines
Unicornisaurous has uploaded a new change for review. https://gerrit.wikimedia.org/r/308421 Change subject: Shorten clickable link text in HTML credit lines .. Shorten clickable link text in HTML credit lines Previously, the clickable text in the generated HTML credit lines was the entire link to the article. This is shortened to a localized version of "Link". Bug: T119686 Change-Id: I708f65a85bfa26c264cdd06a265096027266240c --- M extension.json M i18n/en.json M i18n/qqq.json M resources/mmv/mmv.EmbedFileFormatter.js M tests/qunit/mmv/mmv.EmbedFileFormatter.test.js 5 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/21/308421/1 diff --git a/extension.json b/extension.json index f4b1b20..0beefd2 100644 --- a/extension.json +++ b/extension.json @@ -232,7 +232,8 @@ "multimediaviewer-text-embed-credit-text-l", "multimediaviewer-html-embed-credit-text-bl", "multimediaviewer-html-embed-credit-text-b", - "multimediaviewer-html-embed-credit-text-l" + "multimediaviewer-html-embed-credit-text-l", + "multimediaviewer-html-embed-credit-link-text" ] }, "mmv.ui.download.pane": { diff --git a/i18n/en.json b/i18n/en.json index 17fc6f2..e7d7ac5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -96,6 +96,7 @@ "multimediaviewer-html-embed-credit-text-bl": "By $1, $2, $3", "multimediaviewer-html-embed-credit-text-b": "By $1, $2", "multimediaviewer-html-embed-credit-text-l": "$1, $2", + "multimediaviewer-html-embed-credit-link-text": "Link", "multimediaviewer-embed-byline": "By $1", "multimediaviewer-embed-license": "Licensed under $1.", "multimediaviewer-embed-license-nonfree": "$1.", diff --git a/i18n/qqq.json b/i18n/qqq.json index dda5c8e..dc563f1 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -105,6 +105,7 @@ "multimediaviewer-html-embed-credit-text-bl": "Credit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - name of the author\n* $2 - copyright tag (usually a license)\n* $3 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-html-embed-credit-text-b": "Credit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - name of the author\n* $2 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-html-embed-credit-text-l": "{{optional}}\nCredit text, used when generating HTML to reuse an image - used as a caption, not in the middle of a sentence.\n\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n\nParameters:\n* $1 - copyright tag (usually a license)\n* $2 - URL to the image source\nEach of the parameters could be either plain text or a link.\n{{Related|Multimediaviewer-embed-credit-text}}", + "multimediaviewer-html-embed-credit-link-text": "The clickable text of a link in a credit line, used when generating HTML to reuse an image.\n{{Related|Multimediaviewer-embed-credit-text}}", "multimediaviewer-embed-byline": "Byline (author credit) text, used when generating wikitext/HTML to reuse the image. $1 is author name.\n{{Identical|By}}", "multimediaviewer-embed-license": "License information, used when generating wikitext/HTML to reuse the image. $1 is the license name.", "multimediaviewer-embed-license-nonfree": "Like {{msg-mw|multimediaviewer-embed-license}}, but for non-free images (where $1 is typically not a license name but something like \"Fair use\").", diff --git a/resources/mmv/mmv.EmbedFileFormatter.js b/resources/mmv/mmv.EmbedFileFormatter.js index 0756238..e0cdc06 100644 --- a/resources/mmv/mmv.EmbedFileFormatter.js +++ b/resources/mmv/mmv.EmbedFileFormatter.js @@ -163,7 +163,7 @@ EFFP.getCreditHtml = function ( info ) { var creditText, creditParams, shortURL = info.imageInfo.descriptionShortUrl, - shortLink = this.htmlUtils.makeLinkText( shortURL, { href: shortURL } ), +