mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-18 10:10:48 +00:00
15 lines
356 B
JavaScript
15 lines
356 B
JavaScript
|
export default function message( key ) {
|
||
|
return {
|
||
|
exists: () => true,
|
||
|
text: () => {
|
||
|
if ( key.indexOf( 'popups-refpreview-' ) > -1 ) {
|
||
|
const type = key.split( 'popups-refpreview-' )[ 1 ];
|
||
|
return type === 'generic' ? 'Reference'
|
||
|
: type[0].toUpperCase() + type.slice( 1 ) + ' reference';
|
||
|
} else {
|
||
|
return `<${key}>`;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|