Module:Proofreadpage index template/config/sandbox
Appearance
![]() | This is the module sandbox page for Module:Proofreadpage index template/config (diff). |
Supporting module for Module:Proofreadpage index template, which implements logic for MediaWiki:Proofreadpage index template.
return {
['defaults'] = {
['Source'] = '_empty_',
},
['pagelist'] = {
['pages'] = {
['txt'] = 'Pages'
},
['legend'] = {
['txt'] = '(key to [[Help:Page Status|Page Status]])'
}
},
['quick_notes_header'] = 'Quick notes',
['cover'] = {
['width'] = '250px',
['image'] = 'File:Placeholder book.svg'
},
['missing_heading_id'] = function (id)
return 'Can\'t find heading for ID: ' .. id
end,
['headings'] = {
['title'] = {
['txt'] = 'Title'
},
['progress'] = {
['txt'] = 'Progress'
},
['transclusion'] = {
['txt'] = 'Transclusion'
},
['validation_date'] = {
['txt'] = 'Validated in'
},
['source'] = {
['txt'] = 'Source'
},
['place'] = {
['txt'] = 'Location'
},
['year'] = {
['txt'] = 'Year'
},
['publisher'] = {
['txt'] = 'Publisher'
},
['author'] = {
['txt'] = 'Author'
},
['editor'] = {
['txt'] = 'Editor'
},
['translator'] = {
['txt'] = 'Translator'
},
['illustrator'] = {
['txt'] = 'Illustrator'
},
['volumes'] = {
['txt'] = 'Volumes'
},
['isbn'] = {
['txt'] = 'ISBN'
},
['oclc'] = {
['txt'] = 'OCLC'
},
['lccn'] = {
['txt'] = 'LCCN'
},
['ark'] = {
['txt'] = 'ARK'
},
--[=[
['National Archives'] = {
['txt'] = 'National Archives'
},
]=]
['doi'] = {
['txt'] = 'DOI'
}
},
['status'] = {
['T'] = {
['cat'] = 'Index Validated',
['txt'] = 'Done—All pages of the work proper are validated',
},
['V'] = {
['cat'] = 'Index Proofread',
['txt'] = 'Proofread—All pages of the work proper are proofread, but not all are validated',
},
['C'] = {
['cat'] = 'Index Not-Proofread',
['txt'] = 'To be proofread',
},
['MS'] = {
['cat'] = 'Index - Ready for Match and Split',
['txt'] = 'Ready for Match and Split',
},
['OCR'] = {
['cat'] = 'Index - Text Layer Requested',
['txt'] = 'Source file needs an OCR text layer',
},
['L'] = {
['cat'] = 'Index - File to fix',
['txt'] = 'Source file must be fixed before proofreading',
['error'] = true,
},
['X'] = {
['cat'] = 'Index - File to check',
['txt'] = 'Create a pagelist for the source file before commencing proofreading (to verify file is correct)',
['error'] = true
},
['_missing'] = {
['cat'] = 'Index - Unknown progress',
['txt'] = 'Missing progress (template error)',
['error'] = true,
},
['_default'] = {
['cat'] = 'Index - Unknown progress',
['txt'] = function (index_status)
return 'Unknown progress: ' .. index_status .. ' (template error)'
end,
['error'] = true,
}
},
['transclusion'] = {
['yes'] = {
['cat'] = 'Fully transcluded',
['txt'] = 'Fully transcluded',
['help'] = 'The work is fully transcluded, including front and end matter and images'
},
['notimg'] = {
['cat'] = 'Images not fully transcluded',
['txt'] = 'Images not fully transcluded',
['help'] = 'The work is fully transcluded, but that some images are still missing or need improvement',
},
['notadv'] = {
['cat'] = 'Advertising not transcluded',
['txt'] = 'Advertising not transcluded',
['help'] = 'The main body of the work is properly transcluded, though front- or end-matter advertising material is not'
},
['held'] = {
['cat'] = 'Transclusion on hold',
['txt'] = 'Transclusion on hold',
['help'] = 'There is a problem with transcluding the work (which should be explained on the talk page)'
},
['check'] = {
['cat'] = 'Transclusion check required',
['txt'] = 'Transclusion check required',
['help'] = 'The transclusion of the work is incomplete or needs checking'
},
['no'] = {
['cat'] = 'Index not transcluded',
['txt'] = 'Index not transcluded or unreviewed',
['help'] = 'This work is not transcluded or has not been reviewed for transclusion'
},
['_missing'] = {
['cat'] = 'Index not transcluded',
['txt'] = 'Missing transclusion status (template error)',
['error'] = true,
},
['_default'] = {
['cat'] = 'Index not transcluded',
['txt'] = function (index_status)
return 'Unknown transclusion status: ' .. index_status .. ' (template error)'
end,
['error'] = true,
}
},
['indicators'] = {
['pagegame'] = {
['name'] = 'WS Page Game',
['image'] = 'File:OOjs UI icon page number.svg',
['link'] = function(args)
return tostring(mw.uri.fullUrl('toolforge:ws-page-game', {['wikisource'] = 'en', ['index'] = mw.uri.encode(args.fileTitle.rootText), ['lang'] = 'en'}))
end,
['caption'] = 'Wikisource Page Game (step-by-step pagelist builder)'
},
['purge'] = {
['name'] = 'purge file',
['image'] = 'File:OOjs UI icon reload.svg',
['link'] = function(args)
return tostring(mw.uri.fullUrl('commons:File:' .. args.fileTitle.rootText, {['action'] = 'purge'}))
end,
['caption'] = 'Purge file'
},
['book2scroll'] = {
['name'] = 'book2scroll',
['image'] = 'File:Library-logo-blue-outline.png',
['link'] = function(args)
return tostring(mw.uri.fullUrl('toolforge:book2scroll', {['lang'] = 'en', ['file'] = mw.uri.encode(args.fileTitle.rootText)}))
end,
['caption'] = 'Open in Book2Scroll'
},
['bookreader'] = {
['name'] = 'bookreader',
['image'] = 'File:BookReader-favicon.svg',
['link'] = function(args)
return tostring(mw.uri.fullUrl('toolforge:bookreader/en/' .. mw.uri.encode(args.fileTitle.rootText)))
end,
['caption'] = 'Open file in BookReader'
},
['validated'] = {
['name'] = 'validated-index-date',
['image'] = 'File:Yes Check Circle.svg',
['link'] = function (args)
local vdate = args['Validation_date']
return vdate and tostring(mw.uri.fullUrl('Category:Indexes validated in ' .. vdate)) or ''
end,
['caption'] = function (args)
local vdate = args['Validation_date']
return vdate and 'Validated in ' .. vdate or nil
end,
['alt'] = 'Validated index page.',
['width'] = '15px',
['include'] = function (args)
return args['Validation_date'] ~= nil
end
}
},
['indicator_defaults'] = {
['width'] = '20px',
['include'] = function (args)
return true
end
},
['url_gens'] = {
['isbn'] = function(id, text)
return require('Module:ISBN')._ISBN({id})
end,
['oclc'] = function(id, text)
return '[https://www.worldcat.org/oclc/' .. mw.uri.encode(id, 'PATH') .. ' ' .. text .. ']'
end,
['ark'] = function(id, text)
return '[https://n2t.net/' .. mw.uri.encode(id, 'QUERY') .. ' ' .. text .. ']'
end,
['doi'] = function(id, text)
return '[https://doi.org/' .. mw.uri.encode(id, 'PATH') .. ' ' .. text .. ']'
end
}
}