Module talk:Proofreadpage index template

Integrating transclusion check and validated date
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:UnconnectedPages — billinghurst  sDrewth  01:43, 6 April 2021 (UTC)


 * 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. Inductiveload— talk/contribs 11:50, 6 April 2021 (UTC)
 * 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)
 * ✅ —unsigned comment by Billinghurst (talk).

Manual page lists
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)


 * @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)
 * 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)

Error with volumes but no title
I know it's not a sensible thing to do, but if you have no title but add volume info, there's an error: 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)


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

Precedence order
Currently at line 764

'''langcat = langcat .. ISO_639.language_name(lang) or "an unknown language"'''

If lang has, for example the value 'english' (which is invalid) then the ISO_639 call will return nil

substituting

'''langcat = langcat .. nil or "an unknown language"'''

Under the current precedence rules this ends up with '''langcat .. nil''' which is an error

I believe that a way around this is by adding brackets

langcat = langcat .. (ISO_639.language_name(lang) or "an unknown language") Desb42 (talk) 16:51, 13 June 2024 (UTC)