mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Added 'Learn more' message
Message was added to replace 'multimediaviewer-repository' when the file was local Bug: 56121 Change-Id: I2c6cef2cb21f88159dc56ca7c94c4be21e553db9
This commit is contained in:
parent
f18208025c
commit
fb4367f24c
|
@ -31,6 +31,7 @@ $messages['en'] = array(
|
|||
'multimediaviewer-pref-desc' => 'Improve your multimedia viewing experience with this new tool. It displays images in larger size on pages that have thumbnails. Images are shown in a nicer Lightbox overlay, and can also be viewed in full-size.',
|
||||
'multimediaviewer-file-page' => 'Go to corresponding file page',
|
||||
'multimediaviewer-repository' => 'Learn more on $1',
|
||||
'multimediaviewer-repository-local' => 'Learn more',
|
||||
'multimediaviewer-datetime-created' => 'Created on $1',
|
||||
'multimediaviewer-datetime-uploaded' => 'Uploaded on $1',
|
||||
'multimediaviewer-userpage-link' => '{{GENDER:$2|Uploaded}} by $1',
|
||||
|
@ -71,7 +72,13 @@ $messages['qqq'] = array(
|
|||
'multimediaviewer-pref-desc' => 'Description of preference',
|
||||
'multimediaviewer-file-page' => 'Text for a link to the file page for an image.',
|
||||
'multimediaviewer-repository' => 'Link to the repository where the image is hosted. Parameters:
|
||||
* $1 - the display name of that site',
|
||||
* $1 - the display name of that site
|
||||
See also:
|
||||
* {{msg-mw|multimediaviewer-repository-local}}',
|
||||
'multimediaviewer-repository-local' => 'Link to repository where the image is locally hosted.
|
||||
{{Identical|Learn more}}
|
||||
See also:
|
||||
* {{msg-mw|multimediaviewer-repository}}',
|
||||
'multimediaviewer-datetime-created' => 'Used in JavaScript code. Parameters:
|
||||
* $1 - time and date (formatted)
|
||||
See also:
|
||||
|
|
|
@ -108,6 +108,7 @@ $wgResourceModules['ext.multimediaViewer'] = array_merge( array(
|
|||
'messages' => array(
|
||||
'multimediaviewer-file-page',
|
||||
'multimediaviewer-repository',
|
||||
'multimediaviewer-repository-local',
|
||||
'multimediaviewer-datetime-created',
|
||||
'multimediaviewer-datetime-uploaded',
|
||||
'multimediaviewer-userpage-link',
|
||||
|
|
|
@ -493,16 +493,6 @@
|
|||
}
|
||||
|
||||
if ( repoInfo ) {
|
||||
if ( repoInfo.displayname ) {
|
||||
ui.$repo.text(
|
||||
mw.message( 'multimediaviewer-repository', repoInfo.displayname ).text()
|
||||
);
|
||||
} else {
|
||||
ui.$repo.text(
|
||||
mw.message( 'multimediaviewer-repository', mw.config.get( 'wgSiteName' ) ).text()
|
||||
);
|
||||
}
|
||||
|
||||
if ( repoInfo.server && repoInfo.articlepath ) {
|
||||
articlePath = repoInfo.server + repoInfo.articlepath;
|
||||
} else {
|
||||
|
@ -515,9 +505,16 @@
|
|||
linkToRepo = articlePath.replace( '$1', fileTitle.getPrefixedText() );
|
||||
}
|
||||
|
||||
if ( repoInfo.local ) {
|
||||
if( repoInfo.local ) {
|
||||
ui.$repo.text(
|
||||
mw.message( 'multimediaviewer-repository-local' ).text()
|
||||
);
|
||||
linkToRepo = mw.config.get( 'wgServer' ) + linkToRepo;
|
||||
ui.$useFile.data( 'isLocal' ,repoInfo.local );
|
||||
} else {
|
||||
ui.$repo.text(
|
||||
mw.message( 'multimediaviewer-repository', repoInfo.displayname ).text()
|
||||
);
|
||||
}
|
||||
|
||||
ui.$repo.prop( 'href', linkToRepo );
|
||||
|
|
Loading…
Reference in a new issue