mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-12 07:45:15 +00:00
f97d29923b
Change-Id: I8e9e2db66fa94b33abcf7c9cbaff8defe5003ef6
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}>`;
|
|
}
|
|
}
|
|
}
|
|
};
|