|
|
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Hi Hike395—this is a neat template you've created! I'm planning on following up about the discussion about infobox plurality at the VPT, and this template will be one of the ones under consideration, so I'd like it to be in good shape. Two potential improvements that come to mind:
Thoughts? Also, I realize you missed the earlier plurality discussion. I've drafted an RfC follow-up and am seeking feedback at User_talk:Sdkb#RfC_draft_feedback, so feel free to let me know if you have thoughts about that more broadly. {{u| Sdkb}} talk 00:07, 9 December 2020 (UTC)
(s)issue was this VPT discussion, and although the reception there was somewhat warm enough, there were a bunch of concerns about whether {{ Detect singular}} was quite developed enough to be ready for the task. It's enough to make me nervous about trying to roll it out further, since those sorts of concerns can tip consensus. Do you have any interest in working with this in the sandbox to try to get it able to read all wikilinks as singular? In quasi-technical terms, I think what we want is basically to get it to remove anything within [[ ... ]] before it does the check for list things. Cheers, {{u| Sdkb}} talk 04:13, 8 January 2022 (UTC)
|bullets=1
by default or get rid of it. We could also get rid of |no_comma=
, keeping {{
force singular}} for cases like "Martin Luther King, Jr." (which is still recognized as plural outside of wikilinks). What do you think? —
hike395 (
talk)
06:47, 8 January 2022 (UTC)|bullets=
and |no_comma=
work or don't remove them.
Gonnym (
talk)
08:41, 8 January 2022 (UTC)
|bullets=yes
. That's because {{
plainlist}} doesn't expand into <li></li> pairs, but leaves any list items marked by asterisks. One of the VPT requests was to count the number of list items and if there's only one, call it singular. So I need to count the number of asterisk-delimited items under all cases, not just when |bullets=
is set explicitly to yes.|bullets=
, which should always be on AFAICT.I'm starting to slowly convert the live versions of {{ Infobox television}}, {{ Infobox television episode}}, and {{ Infobox film}} to use {{ Pluralize from text}} and Module:Detect singular. — hike395 ( talk) 15:57, 9 January 2022 (UTC)
[[List of honors and awards received by Barack Obama]]
should return plural. {{u|
Sdkb}}
talk
22:39, 9 January 2022 (UTC)
spouse = {{Marriage|[[Virginia Eliza Clemm Poe]]|1836|1847|end=died}}
, which is returning plural for some reason. Other uses of {{
Marriage}} seem to be doing the same (see e.g.
William Hanna). Any idea why, @
Hike395? Also, we need to remove everything within a citation, so that the citations at e.g.
Mark David Chapman don't lead to a plural result. {{u|
Sdkb}}
talk
00:17, 10 January 2022 (UTC)
|parents=
, since it's often used to only list one parent when a person only has one notable parent, but it should still use Parentsin that case, expect for the rare instance where someone actually has only one parent. So I'm not sure we can escape
(s)in that particular scenario. {{u| Sdkb}} talk 00:20, 10 January 2022 (UTC)
I've gotten this to work with all of the area codes, demonyms, nicknames, and mottoes in Template:Infobox settlement/testcases. I made the following changes:
|ignore_links=
that, when false, prevents the rewriting of all wikilinks as WIKILINK. This is required to parse the nicknames of some cities.Comments/suggestions are welcome. I'll see if I can find other interesting infoboxes to auto-pluralize. — hike395 ( talk) 22:50, 8 January 2022 (UTC)
|nicknames=
and keep |nickname=
), have a bot replace usages and when complete, remove support from the infobox. But that's not really related to this template, you just asked for comments :)
Gonnym (
talk)
23:43, 9 January 2022 (UTC)
Sdkb proposed two new features (above):
— hike395 ( talk) 02:07, 10 January 2022 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Per above, please adopt the sandbox version, which converts to Lua to improve this template's functionality. Courtesy ping Hike395. {{u| Sdkb}} talk 07:03, 14 January 2022 (UTC)
@
Hike395, I was wondering if there was a way to make this work with dates? Date usage such as {{
Detect singular|May 2, 2005}}
and {{
Detect singular|
fail because I assume the comma in the date.
Gonnym (
talk)
10:18, 22 June 2021 (UTC)
{{
Start date|2005|5|2}}
}}
{{Pluralize from text|May 2, 2005||singular|plural}}
→ singular{{Pluralize from text|{{Start date|2005|5|2}}||singular|plural}}
→ singular|no_comma=1
to get this behavior: the regular expressions are better now. —
hike395 (
talk)
00:04, 9 January 2022 (UTC)I've had this draft RfC sitting in my sandbox for a few months, with accompanying talk discussion with Jonesey95, RexxS, Hike395, and GhostInTheMachine. I've hesitated to launch it, though, since each of the possible options seem to have meaningful downsides. Option2a got the closest, but it requires adding a ton of parameters, which would make documentation more complex, and errors in the automatic detection or ambiguous cases would require editing work.
I'm realizing that what we really need is a way to go with option 3 (using this template), but with an override function that can be triggered within uses of infoboxes that themselves use this template. For instance:
At {{ Infobox person}}, we'd set it up so that instead of the label "Spouse(s)", as it currently does, it displays either "Spouse" or "Spouses" based on the result from this template. However, for the rare cases in which this template gets it wrong, someone using the infobox could do this:
{{Infobox person |name=Camilla, Duchess of Cornwall |spouse=[[Charles, Prince of Wales]]{{force singular}} }}
Or this:
{{Infobox person |name=Henry VIII |spouse=[[Henry VIII's wives]]{{force plural}} }}
This template would search for the presence of {{ force singular}} and {{ force plural}} in any string it evaluates and resolve appropriately if one of them is present. Invoking them when you use a template would be easier than Option 2a, as would be explaining them (since anyone curious would just go to their documentation page).
What do you all think? And if this override is something we want for this template, would any of you be able to help code it? {{u| Sdkb}} talk 23:55, 25 August 2021 (UTC)
|spouse=
parameter which has a singular value that is in fact a plural. In this situation I'd add |spouses=
to the infobox.
Gonnym (
talk)
08:03, 28 August 2021 (UTC)
|spouses=
is option 2 from the draft RfC; we considered that but it has some drawbacks.{{Infobox person |name = Henry |spouse = [[Henry VIII's wives]] |spouse_text = Wives }}
[[Charles, Prince of Wales]]{{force singular}}
for {{force singular}}
or {{force plural}}
). How expensive would that be? {{u|
Sdkb}}
talk
07:52, 25 October 2021 (UTC)
value{{force singular}}
, no different than any other template currently used in infobox values. {{u|
Sdkb}}
talk
22:19, 26 October 2021 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In the sandbox version, I've added the capability for this template to detect overrides, which can be triggered through the {{ Force singular}} or {{ Force plural}} templates. If it looks good, could we implement? {{u| Sdkb}} talk 22:01, 26 October 2021 (UTC)
@ Frietjes: It looks like you added a bug fix to Module:Detect singular/sandbox for a case where there is a trailing line break in an argument to {{ marriage}}. You wrote test cases, but you never promoted it to the main Module. I'm about to do some development in the sandbox: do you want me to incorporate your fix, or let it revert? — hike395 ( talk) 01:19, 7 September 2022 (UTC)
|
|
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Hi Hike395—this is a neat template you've created! I'm planning on following up about the discussion about infobox plurality at the VPT, and this template will be one of the ones under consideration, so I'd like it to be in good shape. Two potential improvements that come to mind:
Thoughts? Also, I realize you missed the earlier plurality discussion. I've drafted an RfC follow-up and am seeking feedback at User_talk:Sdkb#RfC_draft_feedback, so feel free to let me know if you have thoughts about that more broadly. {{u| Sdkb}} talk 00:07, 9 December 2020 (UTC)
(s)issue was this VPT discussion, and although the reception there was somewhat warm enough, there were a bunch of concerns about whether {{ Detect singular}} was quite developed enough to be ready for the task. It's enough to make me nervous about trying to roll it out further, since those sorts of concerns can tip consensus. Do you have any interest in working with this in the sandbox to try to get it able to read all wikilinks as singular? In quasi-technical terms, I think what we want is basically to get it to remove anything within [[ ... ]] before it does the check for list things. Cheers, {{u| Sdkb}} talk 04:13, 8 January 2022 (UTC)
|bullets=1
by default or get rid of it. We could also get rid of |no_comma=
, keeping {{
force singular}} for cases like "Martin Luther King, Jr." (which is still recognized as plural outside of wikilinks). What do you think? —
hike395 (
talk)
06:47, 8 January 2022 (UTC)|bullets=
and |no_comma=
work or don't remove them.
Gonnym (
talk)
08:41, 8 January 2022 (UTC)
|bullets=yes
. That's because {{
plainlist}} doesn't expand into <li></li> pairs, but leaves any list items marked by asterisks. One of the VPT requests was to count the number of list items and if there's only one, call it singular. So I need to count the number of asterisk-delimited items under all cases, not just when |bullets=
is set explicitly to yes.|bullets=
, which should always be on AFAICT.I'm starting to slowly convert the live versions of {{ Infobox television}}, {{ Infobox television episode}}, and {{ Infobox film}} to use {{ Pluralize from text}} and Module:Detect singular. — hike395 ( talk) 15:57, 9 January 2022 (UTC)
[[List of honors and awards received by Barack Obama]]
should return plural. {{u|
Sdkb}}
talk
22:39, 9 January 2022 (UTC)
spouse = {{Marriage|[[Virginia Eliza Clemm Poe]]|1836|1847|end=died}}
, which is returning plural for some reason. Other uses of {{
Marriage}} seem to be doing the same (see e.g.
William Hanna). Any idea why, @
Hike395? Also, we need to remove everything within a citation, so that the citations at e.g.
Mark David Chapman don't lead to a plural result. {{u|
Sdkb}}
talk
00:17, 10 January 2022 (UTC)
|parents=
, since it's often used to only list one parent when a person only has one notable parent, but it should still use Parentsin that case, expect for the rare instance where someone actually has only one parent. So I'm not sure we can escape
(s)in that particular scenario. {{u| Sdkb}} talk 00:20, 10 January 2022 (UTC)
I've gotten this to work with all of the area codes, demonyms, nicknames, and mottoes in Template:Infobox settlement/testcases. I made the following changes:
|ignore_links=
that, when false, prevents the rewriting of all wikilinks as WIKILINK. This is required to parse the nicknames of some cities.Comments/suggestions are welcome. I'll see if I can find other interesting infoboxes to auto-pluralize. — hike395 ( talk) 22:50, 8 January 2022 (UTC)
|nicknames=
and keep |nickname=
), have a bot replace usages and when complete, remove support from the infobox. But that's not really related to this template, you just asked for comments :)
Gonnym (
talk)
23:43, 9 January 2022 (UTC)
Sdkb proposed two new features (above):
— hike395 ( talk) 02:07, 10 January 2022 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Per above, please adopt the sandbox version, which converts to Lua to improve this template's functionality. Courtesy ping Hike395. {{u| Sdkb}} talk 07:03, 14 January 2022 (UTC)
@
Hike395, I was wondering if there was a way to make this work with dates? Date usage such as {{
Detect singular|May 2, 2005}}
and {{
Detect singular|
fail because I assume the comma in the date.
Gonnym (
talk)
10:18, 22 June 2021 (UTC)
{{
Start date|2005|5|2}}
}}
{{Pluralize from text|May 2, 2005||singular|plural}}
→ singular{{Pluralize from text|{{Start date|2005|5|2}}||singular|plural}}
→ singular|no_comma=1
to get this behavior: the regular expressions are better now. —
hike395 (
talk)
00:04, 9 January 2022 (UTC)I've had this draft RfC sitting in my sandbox for a few months, with accompanying talk discussion with Jonesey95, RexxS, Hike395, and GhostInTheMachine. I've hesitated to launch it, though, since each of the possible options seem to have meaningful downsides. Option2a got the closest, but it requires adding a ton of parameters, which would make documentation more complex, and errors in the automatic detection or ambiguous cases would require editing work.
I'm realizing that what we really need is a way to go with option 3 (using this template), but with an override function that can be triggered within uses of infoboxes that themselves use this template. For instance:
At {{ Infobox person}}, we'd set it up so that instead of the label "Spouse(s)", as it currently does, it displays either "Spouse" or "Spouses" based on the result from this template. However, for the rare cases in which this template gets it wrong, someone using the infobox could do this:
{{Infobox person |name=Camilla, Duchess of Cornwall |spouse=[[Charles, Prince of Wales]]{{force singular}} }}
Or this:
{{Infobox person |name=Henry VIII |spouse=[[Henry VIII's wives]]{{force plural}} }}
This template would search for the presence of {{ force singular}} and {{ force plural}} in any string it evaluates and resolve appropriately if one of them is present. Invoking them when you use a template would be easier than Option 2a, as would be explaining them (since anyone curious would just go to their documentation page).
What do you all think? And if this override is something we want for this template, would any of you be able to help code it? {{u| Sdkb}} talk 23:55, 25 August 2021 (UTC)
|spouse=
parameter which has a singular value that is in fact a plural. In this situation I'd add |spouses=
to the infobox.
Gonnym (
talk)
08:03, 28 August 2021 (UTC)
|spouses=
is option 2 from the draft RfC; we considered that but it has some drawbacks.{{Infobox person |name = Henry |spouse = [[Henry VIII's wives]] |spouse_text = Wives }}
[[Charles, Prince of Wales]]{{force singular}}
for {{force singular}}
or {{force plural}}
). How expensive would that be? {{u|
Sdkb}}
talk
07:52, 25 October 2021 (UTC)
value{{force singular}}
, no different than any other template currently used in infobox values. {{u|
Sdkb}}
talk
22:19, 26 October 2021 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In the sandbox version, I've added the capability for this template to detect overrides, which can be triggered through the {{ Force singular}} or {{ Force plural}} templates. If it looks good, could we implement? {{u| Sdkb}} talk 22:01, 26 October 2021 (UTC)
@ Frietjes: It looks like you added a bug fix to Module:Detect singular/sandbox for a case where there is a trailing line break in an argument to {{ marriage}}. You wrote test cases, but you never promoted it to the main Module. I'm about to do some development in the sandbox: do you want me to incorporate your fix, or let it revert? — hike395 ( talk) 01:19, 7 September 2022 (UTC)