Module talk:Proofreadpage index template

From Wikisource
Latest comment: 5 months ago by Samwilson in topic Error with volumes but no title
Jump to navigation Jump to search

Integrating transclusion check and validated date[edit]

@Inductiveload: I wondering whether we can now start to think about smarter data fields into the template for where we have steady processes.

For instance, embedding Template:Index transcluded and its options into a dropdown. Here I am thinking about when the work is promoted to proofread that this activates a field to appear with the options on the template. Thinking that these options JSON'd would then give us some ability to have a bot check against the transcluded works and badges at WD (work done by Kaldari)?

Also when a work is validated, that we can separately activate a dropdown for Template:index validated date with a dropdown list of YYYY-MM (sort by date decreasing) or similar, and the stars and categorisation that apply.

I am also hoping that having some checks here will enable us to look to identify root page works that are not having WD data (somehow) as the current check for works without pages shows all works subpages or not, and we know that is not appropriate in all our cases. Per poking through Special:UnconnectedPagesbillinghurst sDrewth 01:43, 6 April 2021 (UTC)Reply

@Billinghurst: I actually started setting this up on my local dev Wiki 2 weeks ago. It's pretty easy to do. The worst bit will probably just be be botting all the existing 8555 {{Index transcluded}} instances plus 4877 {{Index validated date}} pages.
Re. stars and cats: at first this module can just call the templates as they are so this will be the exact same rendering. Maybe we can bring it "in house" later, if that seems necessary. Inductiveloadtalk/contribs 11:50, 6 April 2021 (UTC)Reply
We have the bot exactly for that purpose. Transcactional improvement is fine, as long as ideas and wishes don't have to follow that path. — billinghurst sDrewth 12:16, 6 April 2021 (UTC)Reply
Done unsigned comment by Billinghurst (talk) 07:34, 22 April 2021‎ (UTC).Reply

Manual page lists[edit]

@Xover: I think perhaps this line in __getPagelist() should be changed to add a newline before the Pages parameter, e.g. :wikitext( '\n' .. mw.text.trim( args["Pages"] ) ), because at the moment things are not displaying well for Index pages with manual page lists. For example, see Index:Letter from Ernest to Aubrey Hall 26 November 1916 where there's a list of links to pages which should be (and used to) display on one line but which now has the first and last parts inline and the bits in between in their own paragraph. Sam Wilson 00:52, 26 November 2023 (UTC)Reply

@Samwilson: HA HA! I have managed to fool you with my clever cleverness! There are actually TWO code paths for this, and you have picked my decoy! 😎
The module currently contains two versions of the same code, one of which is only traversed if |tmplver= is non-empty (try setting it to 42 to see the gross demo version, to any other value to test the new code). It's due to being in the middle of a careful migration from template to module with improved markup structure along the way, and then I ran out of time to finish up (I need to get some beta testers from the community before switching over). That's why the code is so verbose and yucky just now.
In any case, I've made the change you suggested (plus a trailing newline, sigh) to force p-wrapping to keep its grubby mitts off. Thanks for the heads up! Xover (talk) 06:29, 26 November 2023 (UTC)Reply
@Xover: hehe, well I knew there was a good reason why I asked instead of blundering in! :-) Thanks for fixing it up, it looks good now. Sam Wilson 07:30, 26 November 2023 (UTC)Reply

Error with volumes but no title[edit]

@Xover: I know it's not a sensible thing to do, but if you have no title but add volume info, there's an error: "Lua error in Module:Proofreadpage_index_template at line 200: attempt to concatenate local 'content' (a nil value). For example: https://en.wikisource.org/w/index.php?title=Index:HW_Bunbury_papers,_vol_2,_slwa_b1845344_2.pdf&oldid=13699246 Sam Wilson 02:57, 5 December 2023 (UTC)Reply

@Samwilson: Thanks. Armour plating added. Xover (talk) 07:07, 5 December 2023 (UTC)Reply
@Xover: Looks good, thanks! Sam Wilson 07:10, 5 December 2023 (UTC)Reply