mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-16 20:35:09 +00:00
Remove trainling dot from download attibution text to not break URLs
When formatting the attribution as plain text, make sure that the source parameter (which typically ends with an URL) is not followed by a '.', which could break autolinking when e.g. the text is copied into a mail. Change-Id: I5406fe3a55bc4ef6802b32d5a3d533ce9f49b361
This commit is contained in:
parent
e9d3e041cd
commit
4a05b97dc9
16
i18n/en.json
16
i18n/en.json
|
@ -76,14 +76,14 @@
|
|||
"multimediaviewer-embed-wt": "Wikitext",
|
||||
"multimediaviewer-embed-html": "HTML",
|
||||
"multimediaviewer-embed-explanation": "Use this code to embed the file",
|
||||
"multimediaviewer-text-embed-credit-text-tbls": "\"$1\" by $2. Licensed under $3 via $4.",
|
||||
"multimediaviewer-text-embed-credit-text-tls": "\"$1\". Licensed under $2 via $3.",
|
||||
"multimediaviewer-text-embed-credit-text-tbs": "\"$1\" by $2. Via $3.",
|
||||
"multimediaviewer-text-embed-credit-text-tbl": "\"$1\" by $2. Licensed under $3.",
|
||||
"multimediaviewer-text-embed-credit-text-tb": "\"$1\" by $2.",
|
||||
"multimediaviewer-text-embed-credit-text-ts": "\"$1\". Via $2.",
|
||||
"multimediaviewer-text-embed-credit-text-tl": "\"$1\". Licensed under $2.",
|
||||
"multimediaviewer-text-embed-credit-text-t": "\"$1\".",
|
||||
"multimediaviewer-text-embed-credit-text-tbls": "\"$1\" by $2. Licensed under $3 via $4",
|
||||
"multimediaviewer-text-embed-credit-text-tls": "\"$1\". Licensed under $2 via $3",
|
||||
"multimediaviewer-text-embed-credit-text-tbs": "\"$1\" by $2. Via $3",
|
||||
"multimediaviewer-text-embed-credit-text-tbl": "\"$1\" by $2. Licensed under $3",
|
||||
"multimediaviewer-text-embed-credit-text-tb": "\"$1\" by $2",
|
||||
"multimediaviewer-text-embed-credit-text-ts": "\"$1\". Via $2",
|
||||
"multimediaviewer-text-embed-credit-text-tl": "\"$1\". Licensed under $2",
|
||||
"multimediaviewer-text-embed-credit-text-t": "\"$1\"",
|
||||
"multimediaviewer-html-embed-credit-text-tbls": "\"$1\" by $2. Licensed under $3 via $4.",
|
||||
"multimediaviewer-html-embed-credit-text-tls": "\"$1\". Licensed under $2 via $3.",
|
||||
"multimediaviewer-html-embed-credit-text-tbs": "\"$1\" by $2. Via $3.",
|
||||
|
|
|
@ -82,14 +82,14 @@
|
|||
"multimediaviewer-embed-wt": "Used to represent a choice for embedding a file in a wiki page, as wikitext.",
|
||||
"multimediaviewer-embed-html": "Used to represent a choice for embedding a file in an HTML document, as HTML.",
|
||||
"multimediaviewer-embed-explanation": "Used below the embed textarea to explain what we expect the user to do.",
|
||||
"multimediaviewer-text-embed-credit-text-tbls": "Credit text, used when generating plain text for attributing an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the license\n* $4 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tls": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the license\n* $3 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tbs": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tbl": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the license\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tb": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-ts": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tl": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the license\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-t": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-text-embed-credit-text-tbls": "Credit text, used when generating plain text for attributing an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the license\n* $4 - name of the website/institution which was the direct source for this image\nThe last parameter is usually an URL.",
|
||||
"multimediaviewer-text-embed-credit-text-tls": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the license\n* $3 - name of the website/institution which was the direct source for this image\nThe last parameter is usually an URL.",
|
||||
"multimediaviewer-text-embed-credit-text-tbs": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the website/institution which was the direct source for this image\nThe last parameter is usually an URL.",
|
||||
"multimediaviewer-text-embed-credit-text-tbl": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the license",
|
||||
"multimediaviewer-text-embed-credit-text-tb": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author",
|
||||
"multimediaviewer-text-embed-credit-text-ts": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the website/institution which was the direct source for this image\nThe last parameter is usually an URL.",
|
||||
"multimediaviewer-text-embed-credit-text-tl": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the license",
|
||||
"multimediaviewer-text-embed-credit-text-t": "Credit text, used when generating plain text to attribute an image.\nWhich one of the multimediaviewer-text-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)",
|
||||
"multimediaviewer-html-embed-credit-text-tbls": "Credit text, used when generating HTML to reuse an image.\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the license\n* $4 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-html-embed-credit-text-tls": "Credit text, used when generating HTML to reuse an image.\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the license\n* $3 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
"multimediaviewer-html-embed-credit-text-tbs": "Credit text, used when generating HTML to reuse an image.\nWhich one of the multimediaviewer-html-embed-credit-text-* messages is used will depend on what information about the image is available.\n* $1 - name of the work (typically the filename without an extension)\n* $2 - name of the author\n* $3 - name of the website/institution which was the direct source for this image\nEach of the parameters could be either plain text or a link.",
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
}
|
||||
} );
|
||||
|
||||
assert.strictEqual( txt, '"Image Title" by Author - Source. Via Localcommons - quuuux.', 'Sanity check' );
|
||||
assert.strictEqual( txt, '"Image Title" by Author - Source. Via Localcommons - quuuux', 'Sanity check' );
|
||||
|
||||
txt = formatter.getCreditText( {
|
||||
repoInfo: {
|
||||
|
@ -217,6 +217,6 @@
|
|||
}
|
||||
} );
|
||||
|
||||
assert.strictEqual( txt, '"Image Title" by Author - Source. Licensed under Do What the Fuck You Want Public License via Localcommons - quuuux.', 'License message works' );
|
||||
assert.strictEqual( txt, '"Image Title" by Author - Source. Licensed under Do What the Fuck You Want Public License via Localcommons - quuuux', 'License message works' );
|
||||
} );
|
||||
}( mediaWiki ) );
|
||||
|
|
Loading…
Reference in a new issue