Module talk:Labelled list hatnote
![]() | This module was nominated for deletion. Please review the prior discussions if you are considering re-nomination:
|
Proposal to add nowrap capabability
A proposal to add nowrap capability is given initially for {{Further}}. There is a working template space mockup at Template:Further/sandbox, and a demo of it on the Talk page. Please see discussion at Template:Further#Adding nowrap. Courtesy ping: User:Nihiltres. Thanks, Mathglot (talk) 06:06, 21 March 2022 (UTC)
Boolean problem
@Nihiltres: Recent edits changed selfref to a boolean. That has given a problem demonstrated at God the Father#Judaism:
- Lua error in Module:Hatnote at line 146: bad argument #1 to 'addClass' (string, number or nil expected, got boolean).
That is because line 146 of Module:Hatnote is
:addClass(options.selfref and 'selfref')
so if selfref is false, that is what is passed to addClass. Presumably it was nil before and addClass ignored that? Johnuniq (talk) 23:40, 5 June 2022 (UTC)
- Yes, that was a fragile conditional in Module:Hatnote; I fixed it immediately in this edit. {{Nihiltres |talk |edits}} 04:19, 6 June 2022 (UTC)
Template-protected edit request on November 8, 2023
![]() | It is requested that an edit be made to the template-protected module at Module:Labelled list hatnote. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the module's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
This module seems to be causing a comma to unnecessarily appear in lists consisting of two items when the first item is a section link. For example:
compared to
I would provide a more detailed fix in this request if I knew what I was going with Lua, but I think I'll defer that part to someone more experienced at it than me. Thanks! —TechnoSquirrel69 (sigh) 08:01, 8 November 2023 (UTC)
- I think this adjustment is on line number 68 of Module:Hatnote list (one of this module's dependencies). The comment on line number 65 suggests this.
- Nishimoto, Gilberto Kiyoshi (talk) 12:30, 8 November 2023 (UTC)
-- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" : local conjunction = s .. options.conjunction .. s : if #list == 2 and searchDisp(list[1], "§") or #list > 2 then : conjunction = separator .. conjunction : end
- That looks like a deliberate programming choice. Also, the documentation for that module says that it is used in over 1 million pages, so any changes would need to be tested thoroughly. – Jonesey95 (talk) 01:06, 9 November 2023 (UTC)
- Since it seems now seems to be intentional, does anyone know of any particular reason why the comma is programmed to appear after a section link? It's not immediately obvious to me what the point of that is. —TechnoSquirrel69 (sigh) 01:12, 9 November 2023 (UTC)
- accessibility, maybe... Nishimoto, Gilberto Kiyoshi (talk) 01:37, 9 November 2023 (UTC)
- I just tried to indicate, to the editor of the previous message, the point where I think the issue he raised lies. Although grammar rules vary between languages, this comma helps me discern where 2 (page and section) are 1 (link). So I'm not opposing it. I'm training in editing, to adapt enwiki modules to ptwiki, and I'm really enjoying the 'self-taught' learning. The English language is not my native language, I depend on web translators to understand and communicate with you, so forgive me if I make some mistakes (such mistakes are not intentional). Grateful for the attention. Nishimoto, Gilberto Kiyoshi (talk) 01:31, 9 November 2023 (UTC)
- Since it seems now seems to be intentional, does anyone know of any particular reason why the comma is programmed to appear after a section link? It's not immediately obvious to me what the point of that is. —TechnoSquirrel69 (sigh) 01:12, 9 November 2023 (UTC)
- That looks like a deliberate programming choice. Also, the documentation for that module says that it is used in over 1 million pages, so any changes would need to be tested thoroughly. – Jonesey95 (talk) 01:06, 9 November 2023 (UTC)
- @Nihiltres: * Pppery * it has begun... 18:20, 10 November 2023 (UTC)