Jump to content

Template talk:Class mask

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Help class suggestion

[edit]

I suggest creating an optional help-class that is similar to redirect in that it can be activated by setting help=yes, and which can then be used to automatically categorise pages in the help namespace. I have added to code necessary to do this at the sandbox here. I do not have edit permission for the Module, so if no one objects and no one implements the edit, I will put forth an edit request for this in a few days. Indigopari (talk) 05:28, 25 April 2023 (UTC)[reply]

Which WikiProject wishes to use Help-class? Unless there is an actual use case, I do not see much point in making this change. There is actually a drive to standardise these classes, not add new ones. — Martin (MSGJ · talk) 06:29, 25 April 2023 (UTC)[reply]
WikiProject Linguistics, which has many IPA Help pages within its scope. Indigopari (talk) 07:30, 25 April 2023 (UTC)[reply]
It's a good idea to provide examples. Presumably you mean most (if not all) of the 132 pages in Category:NA-Class Linguistics articles. --Redrose64 🌹 (talk) 08:28, 25 April 2023 (UTC)[reply]
Thank you for the tip! Yes, those are the pages to which I was referring; all 132 of them are in the Help namespace, which is a lot (more than the amount of WPLING templates, in fact), and so I think it would be a useful feature to be able to separate them out into their own class.
I would do it at WPLING's custom class mask instead, but in order to create the automatic categorisation, as far as I can tell, I would essentially have to duplicate almost all of Module:class mask in a new Module. For the sake of consistency and to ensure that any improvements to this module are reflected at WPLING, I think it would be better to be able to continue using the class mask template if possible instead. Indigopari (talk) 08:45, 25 April 2023 (UTC)[reply]
It should be a simple matter of editing Template:WikiProject Linguistics/class to add the |help=yes parameter. --Redrose64 🌹 (talk) 09:27, 25 April 2023 (UTC)[reply]
Just adding help=yes to Template:class mask won't automatically classify article in the Help: namespace. For that, I would need to modify the Lua code that handles namespaces directly. Indigopari (talk) 12:03, 25 April 2023 (UTC)[reply]
In that case I have no concerns about adding this functionality — Martin (MSGJ · talk) 09:37, 25 April 2023 (UTC)[reply]
and what is happening with "ErrorNSswitch"? — Martin (MSGJ · talk) 06:30, 25 April 2023 (UTC)[reply]
I introduced a bunch of debugging variables, as I was trying to track down the TimedText and Module error in test cases. I believe I've resolved it as well Indigopari (talk) 07:33, 25 April 2023 (UTC)[reply]

Protected edit request on 27 April 2023 - add help class

[edit]

I request creating an optional help-class that is similar to redirect in that it can be activated by setting help=yes, and which can then be used to automatically categorise pages in the help namespace. I have added to code necessary to do this at the sandbox at version with new code, and the difference between my version and the current code in the Module is at here and it involves adding
elseif ns==13 then -- Help talk return resolveExtraGrade('help', args) to resolveDefaultGrade before what is currently line 56, and adding before
elseif grade == 'help' then ret = resolveExtraGrade('help', args) to getGrade before what is currently line 117. The specific line numbers don't matter so long as it's in the correct set of if-else statements. Indigopari (talk) 03:01, 27 April 2023 (UTC)[reply]

I'll add my merged code at the same time — Martin (MSGJ · talk) 05:14, 27 April 2023 (UTC)[reply]
@Indigopari: It wouldn't need to be be like redirect, more like category, file, project or template - a simple namespace detection. --Redrose64 🌹 (talk) 08:37, 27 April 2023 (UTC)[reply]
The way it has been set up is the same as for the other namespaces, i.e. in the corresponding namespace (ns==13) or |class=help. The latter may not be needed but gives project maximum flexibility - for example there could be a help page in the project namespace and they could classify this manually. — Martin (MSGJ · talk) 09:21, 27 April 2023 (UTC)[reply]
 Done — Martin (MSGJ · talk) 11:24, 27 April 2023 (UTC)[reply]
and reverted due to errors. (My changes not Indigopari's.) Test cases on sandbox were working fine, so need to explore further — Martin (MSGJ · talk) 11:26, 27 April 2023 (UTC)[reply]
Okay stupid mistake on my part, but this is now deployed — Martin (MSGJ · talk) 11:35, 27 April 2023 (UTC)[reply]

Follow-up

[edit]

I would like to review this proposal, because Help-class was added to the extended quality scale, which I don't think is what was proposed and is certainly not what I understood, as effectively activates this class for the vast majority of WikiProjects. I think what we want is for |help=yes to activate the class but not |FQS=yes. Ping Indigopari — Martin (MSGJ · talk) 10:15, 17 October 2023 (UTC)[reply]

I think this is now resolved. I added the same logic for |user=yes — Martin (MSGJ · talk) 22:24, 21 October 2023 (UTC)[reply]

B-class checklist logic

[edit]

Please see Wikipedia talk:WikiProject Council#Proposal to change B-class checklist behaviour which would impact this module — Martin (MSGJ · talk) 14:00, 11 September 2023 (UTC)[reply]

For posterity, the following logic was implemented:
  • If class=B or class=C and all B-class criteria passed => B-class
  • If class=B or class=C and any of the B-class criteria failed => C-class
  • If class=B or class=C and not all criteria passed and none failed => defer to input class
— Martin (MSGJ · talk) 10:21, 17 October 2023 (UTC)[reply]

class=SIA

[edit]

I propose to make "SIA" / "sia" an alias for List-class, which seems to be the closest matching class in the standard quality scale. — Martin (MSGJ · talk) 08:46, 12 October 2023 (UTC)[reply]

I see SIAs as more like dab pages. But there are those that differ. --Redrose64 🌹 (talk) 22:04, 13 October 2023 (UTC)[reply]
Some related discussion here — Martin (MSGJ · talk) 19:18, 15 October 2023 (UTC)[reply]
Code is on the sandbox. Does this need further discussion do you think? Disambiguation pages will be identified by the banner shell automatically, so when PIQA is deployed this will result in a conflict which will then be fixed manually. — Martin (MSGJ · talk) 11:13, 16 October 2023 (UTC)[reply]
 Done — Martin (MSGJ · talk) 10:21, 17 October 2023 (UTC)[reply]

Another possible addition: SL as an alias for List. Some projects have used SL to track Stub/Start quality lists. If they switch to the standard scale, then List-class seems appropriate here. — Martin (MSGJ · talk) 07:36, 19 October 2023 (UTC)[reply]

plus Added SL and SI as aliases for List — Martin (MSGJ · talk) 22:23, 21 October 2023 (UTC)[reply]

Merge with Module:WikiProject banner

[edit]

I believe that all uses of this module are via Module:WikiProject banner. A few custom class masks call it independently. Would it make sense to merge the functionality into that module? — Martin (MSGJ · talk) 15:47, 9 November 2023 (UTC)[reply]

Just an update. The basic code of this module has been merged into Module:WikiProject banner and so this module is not used by any banner using the standard quality scale. This one is still in use (for now) for custom masks. — Martin (MSGJ · talk) 19:55, 2 March 2024 (UTC)[reply]

Rating non-articles

[edit]

Following a discussion at Template talk:WikiProject banner shell I am proposing a change in the logic of this module so that all non-articles be rated automatically without regard to the |class= parameter. In other words, a non-applicable |class=stub on a Template would be ignored and the rating will be Template-class not Stub-class. This would apply to all non-articles, e.g. redirects, drafts, files, disambiguation pages, portals, etc. — Martin (MSGJ · talk) 21:14, 25 November 2023 (UTC)[reply]

The only exception (I think) is that |class=FM is allowed in the File namespace. Conversely this value could be ignored in other namespaces. — Martin (MSGJ · talk) 21:16, 25 November 2023 (UTC)[reply]
Sounds fine to me (including the longer description given over at Module talk:WikiProject banner), other than I have no idea what |class=FM is or what it is for. It really makes no sense at all for stubs, templates, categories, project pages, etc., to be classified as "Stub" or "B" class.  — SMcCandlish ¢ 😼  08:06, 26 November 2023 (UTC)[reply]
@SMcCandlish: Please see Wikipedia talk:Content assessment#Add FM-class to the standard extended assessment scale and my posts there. --Redrose64 🌹 (talk) 18:39, 26 November 2023 (UTC)[reply]
The code is in Module:Class mask/sandbox but it will need thorough testing before being implemented — Martin (MSGJ · talk) 16:32, 27 November 2023 (UTC)[reply]
New version passed all my tests and has been deployed. — Martin (MSGJ · talk) 19:52, 28 November 2023 (UTC)[reply]

Note that this change has the effect of ignoring |class=disambig on many pages previously assessed as disambiguation pages, but which are now being treated as unassessed. Many of these are set index articles rather than dab pages. This has led to a big discussion at Wikipedia talk:Content assessment#Pages rated as Disambig-class which are not disambiguation pages. Input welcome — Martin (MSGJ · talk) 22:23, 1 December 2023 (UTC)[reply]

I have added back the option to specify |class=disambig to clear the many pages which have become rated as unassessed. I hope this is just a temporary solution, and we continue to discuss the long-term solution at the link above — Martin (MSGJ · talk) 21:09, 3 December 2023 (UTC)[reply]