MediaWiki talk:Proofreadpage index template

From Wikisource
Jump to: navigation, search


Please add:

Thanks. --HombreDHojalata (talk) 19:19, 20 July 2013 (UTC)

Added. -- George Orwell III (talk) 02:56, 21 July 2013 (UTC)

Please also add pt:Predefinição:Proofread Index Lugusto 17:33, 24 December 2013 (UTC)

Added. -- George Orwell III (talk) 17:43, 24 December 2013 (UTC)

Propose to track empty KEY[edit]

As part of my clean-up of translation status, I am seeing many example of missing key parameter. I propose that we add a tracking category so where they are left empty they are more readily identified and corrected. — billinghurst sDrewth 10:09, 8 May 2016 (UTC)

Proposal to add microformat attribute[edit]

I'd like to add the ws-cover microformat parameter to this template, to make it easier to scrape the URL of the cover image. This could be done either by adding id="ws-cover" to the paragraph element that wraps the cover image, or |class=ws-cover to the actual [[File:...]] syntax that displays the cover image (in which case, it could be left off the placeholder image, which would probably be nicer).

The current code is this:

<p style="margin-top:0; margin-bottom:0;">{{#if:{{{Image|}}}|{{#iferror: {{#expr: 1 + {{{Image}}} }} | {{{Image|[[File:Placeholder book.svg|frameless|link=Special:Upload]]}}} | [[File:{{PAGENAMEE}}|page={{{Image}}}|frameless]]}} }}</p>

I suspect some conversation was had about this once upon a time, but I can't find anything about it now. (Most other microformat parameters are already there.)

Sam Wilson 03:39, 24 July 2016 (UTC)

(Sorry, the 'current code' I pasted above had one of the suggested alterations in it; I've removed that now.) Sam Wilson 08:41, 25 July 2016 (UTC)
Yes check.svg Done I've added the class to the cover image. Hope no one minds. Sam Wilson 09:25, 2 August 2016 (UTC)
@Samwilson: Pardon my pointing this out but my reading of mul:Wikisource:Microformat#Ids_2 suggests the class ought to be applied to an HTML element enclosing a text node containing the path fragment of the image name. In fact your edit results in the non-text-enclosing <img> tag being classified. Unless the screen scraping process is a lot more flexible/smarter than I believe it to currently be I am not sure you have achieved the result you expected. It might be better to explicitly encode a <span id="ws-cover" style="display:none;">{{PAGENAMEE}}/{{{Image}}}</span> just before the closing </p>?

And in any case neither version of this logic is not going to work for things like Index:The Pathway of Roses, Larson, 1913 as this happens to be is a perfectly legal structure which happens to fail the enclosing {{#iferror: check. AuFCL (talk) 11:44, 2 August 2016 (UTC)

Eeek yes, you're quite right @AuFCL. See, I'm trying to extract data about cover pages in order to add values to books on Wikidata for the image (P18) property. The addition of a class to this template is really just to add something to nominate this image over any other (that might be on Index page) as the cover image... I must confess that I'd read the description of the microformat and rather made the jump in my mind that "of course it'd be trivial for the script to extract the name of the commons file..."! So, sorry. This needs some further thought, especially as you say as it doesn't work where the {{{image}}} parameter is not an integer. Sigh.

Not only that, but it needs to be possible to split the thing into two parts: the commons filename, and the page number (which can then be added as a qualifier (e.g.)). I'll carry on with my daft regex for the time being I think! And I'll revert my change to this template.

Sam Wilson 02:30, 3 August 2016 (UTC)

@Samwilson: As I mentioned (I thought clearly) is that we already populate that data from c:template:book using Mediawiki:Gadget-Fill_Index.js which sets definitions and calls fr:MediaWiki:Gadget-Fill_Index.js. That should be usable, I would have thought. — billinghurst sDrewth 04:19, 3 August 2016 (UTC)