User talk:Wugapodes/Capricorn: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
→‎R cs: new section
→‎R cs: Follow-up
Line 113: Line 113:


Another template redirect, {{-r|Template:R cs|R cs}}, has been created (as if we lacked them), and Capricorn does not read it, see [[Special:PermaLink/1190323409]]. [[User:Sam Sailor|Sam]] [[User talk:Sam Sailor|Sailor]] 19:45, 11 January 2024 (UTC)
Another template redirect, {{-r|Template:R cs|R cs}}, has been created (as if we lacked them), and Capricorn does not read it, see [[Special:PermaLink/1190323409]]. [[User:Sam Sailor|Sam]] [[User talk:Sam Sailor|Sailor]] 19:45, 11 January 2024 (UTC)

{{ping|Wugapodes}} Follow-up.

Bugs: If a parameter is used with {{tl|R from alternative scientific name}}, Capricorn reads none of the rcats. {{-r|Acacalis|Example with R from alternative scientific name alone}}, {{-r|Asparagmia|example with R from alternative scientific name inside Redirect category shell}}.{{pb}}Similar with
* {{tl|R avoided double redirect}}, {{-r|Candy crab|example}}
* {{tl|R from misspelling}}, [[Special:PermaLink/1195397951|example]]
* {{tl|R to scientific name}}, {{-r|Dusky Herpetogramma|example}}

Suggested changes:

In RedirectAliases.json add
<pre>
"a2r": "R avoided double redirect",
"R anch": "R to anchor",
"R common": "R to scientific name",
"R hyphen": "R from alternative spelling",
"R low": "R from other capitalisation",
"R member": "R from member",
"R person": "R from person",
"R song": "R from song",
"R the": "R from long name",
"R undab": "R from unnecessary disambiguation",
"R to alt name": "R from alternative name",
"R cs": "Redirect category shell",
"RCS": "Redirect category shell",
"RCATSHELL": "Redirect category shell",
"RCat shell": "Redirect category shell",
"RCat Shell": "Redirect category shell",
"Rcat banner holder": "Redirect category shell",
"Rcatgroup": "Redirect category shell",
"Rcatholder": "Redirect category shell",
"Redirect banner shell": "Redirect category shell",
"Redirect cat shell": "Redirect category shell",
"Redirect category group": "Redirect category shell",
</pre>

Delete the line
<pre>
"R from draft": "R from drafts",
</pre>
insert these instead
<pre>
"R draft": "R from draft namespace",
"R from draft": "R from draft namespace",
"R from Draft": "R from draft namespace",
"R from drafts": "R from draft namespace",
"R from draftspace": "R from draft namespace",
</pre>
and in RedirectTemplates.json rename "R from drafts" to "R from draft namespace".

{{tl|R from species to genus}} is no longer an alias/redirect. Delete the line
<pre>
"R from species to genus": "R from subtopic",
</pre>
from RedirectAliases.json and add "R from species to genus" somewhere in RedirectTemplates.json.

I hope this finds you well. Best, [[User:Sam Sailor|Sam]] [[User talk:Sam Sailor|Sailor]] 19:17, 13 January 2024 (UTC)

Revision as of 19:18, 13 January 2024

Installation instructions

Hi, Wugapodes, I tried following your installation instructions and got a pop-up message saying that this code was in error. It doesn't resemble anything else I have on the page you direct to, most of which start with Import. Got any idea what is wrong? Liz Read! Talk! 03:46, 5 February 2020 (UTC)[reply]

@Liz: The template automatically encodes the link for use in a mw.loader.load() statement (see {{js}}), but the javascript editor doesn't understand how template substitution works so it asks you to confirm the addition. That's not very user friendly, so I've updated the documentation to bypass the template substitution. You could also use importScript('User:Wugapodes/Capricorn.js'); Thanks for letting me know! Wug·a·po·des 04:13, 5 February 2020 (UTC)[reply]

Diff

Is it possible to disable the gadget on diff pages? 1234qwer1234qwer4 (talk) 12:37, 23 February 2020 (UTC)[reply]

Not in the current version, but this is something that's been requested before which hasn't been implemented yet. Wug·a·po·des 21:37, 26 February 2020 (UTC)[reply]
Implemented in 7 June 2021 revision. Wug·a·po·des 20:58, 1 February 2022 (UTC)[reply]

Typo

Could “Middle-earth topi, Toc” please be changed to “Middle-earth topic, To”, thanks. 1234qwer1234qwer4 (talk) 11:31, 26 February 2020 (UTC)[reply]

That'd be in User:Wugapodes/Capricorn.js, which seems like a simple typo that Wugapodes can fix. ~ Amory (utc) 15:25, 26 February 2020 (UTC)[reply]
 Done Wug·a·po·des 21:35, 26 February 2020 (UTC)[reply]

“Geographic name and location”

Misleading name. This should be “Geographic name and country”, which is more specific regarding the disambiguative qualifier. 1234qwer1234qwer4 (talk) 14:40, 17 March 2020 (UTC)[reply]

Namespaces, To

Writing here should be better. For unification, it would be better to remove the “to” prepositions in the Namespaces, To section, being already included in the heading. 1234qwer1234qwer4 (talk) 16:55, 9 April 2020 (UTC)[reply]

Redirects with non-rcat templates

I've grouped together two reports which seem to have the same cause. The regular expressions on lines 179-80 do not expect redirects to have templates (or content) which are not rcats. The default behavior when it encounters a template it doesn't recognize is to break (see line 222) and leave that and all following content untouched. This causes problems for redirects with {{lowercase title}} and {{short description}} (though it's not clear whether redirects should even have those templates in the first place). Like most parts of this legacy code base, the parser function (lines 178-228) needs documented. Wug·a·po·des 20:56, 1 February 2022 (UTC)[reply]

Lowercase title

Capricorn does not recognise the redirect category templates when the page has {{lowercase title}} in it. Example: nCoV. Regards, 1234qwer1234qwer4 (talk) 19:40, 15 March 2020 (UTC)[reply]

@Wugapodes Still not fixed. I tested the script with normaliseTitle printing its return value in the declaration, and it only seems to recognise the {{lowercase title}} where used (looped) in line 211 (I think), while on other redirects it shows all the transcluded templates. ~~~~
User:1234qwer1234qwer4 (talk)
19:04, 29 January 2022 (UTC)[reply]

short description

@Wugapodes: Special:Diff/1068669047. ~~~~
User:1234qwer1234qwer4 (talk)
19:07, 29 January 2022 (UTC)[reply]

Better detection of if a redirect is not marked as patrolled

Hey man im josh mentioned off wiki that older unpatrolled redirects sometimes aren't receiving the "mark as patrolled" check box in Capricorn. Perhaps this is due to how Capricorn is checking to see if a page is reviewed, which if I'm reading the code right I think it does using an API query on line 395. Perhaps changing the API query can fix this bug. I recommend using an API query like this until I can come up with something better, e.g. phab:T313495. Thanks. –Novem Linguae (talk) 20:20, 23 November 2022 (UTC)[reply]

R from cover song

{{R from cover song}} is not supported? --Muhandes (talk) 13:30, 25 December 2022 (UTC)[reply]

Might want to ping @Wugapodes for that. FWIW the template only has 165 transclusions. 1234qwer1234qwer4 20:49, 29 January 2023 (UTC)[reply]
 Done thanks for the ping. Wug·a·po·des 19:33, 30 January 2023 (UTC)[reply]

Suggestion to add target link

I have used Capricorn for a long time and find it helpful, but one thing that has always annoyed me is that I cannot click through the redirect to its target. I often find myself wanting to view the target for various reasons and currently need to open a new tab and navigate to the target via the search bar. Could someone add some sort of link to the interface? Something simple like a clickable "(Link)" below or next to the box containing the redirect name would be great. Compassionate727 (T·C) 13:46, 17 February 2023 (UTC)[reply]

Specific domain names?

Is it possible to add subcategories of Category:Redirects from domain names using this script (for example, this)? If not, please add it in at some point. thanks. 137a (talkedits) 16:13, 26 April 2023 (UTC)[reply]

Aren't they being populated automatically by the rcat template? Either way, supporting template parameters (particularly for tags like {{Radr}}) is something that I believe has been being on the to-do list of this for a while. 1234qwer1234qwer4 22:54, 26 April 2023 (UTC)[reply]
yeah, I knew that. Specific domains such as .com need template parameters, though. 137a (talkedits) 15:33, 28 April 2023 (UTC)[reply]

Not included rcats

There are some rcats which aren't included in the tool which I think could be helpful:

  • R from ZIP code (can go in 'From postal information')
  • R from television episode (can go in 'Works of art and works generally, From')
  • R from television program (can go in 'Works of art and works generally, From')
  • R from demonym (maybe 'Related information, From')
  • R to numeral ('Meta information, To' (to match R from numeral, which is in Meta information, From))

if I think of anymore, I'll add them below. greyzxq talk 09:42, 6 May 2023 (UTC)[reply]

Also maybe a music section with R from song and R from album (which are currently in 'Works of art and works generally, From') and R from band name, R from cover song, R from member and R from tour. greyzxq talk 19:24, 23 May 2023 (UTC)[reply]

There is also R from second-level domain, which can go under 'Related information, From' 137a (talkedits) 13:08, 12 May 2023 (UTC)[reply]
I thought {{R from writer}} was missing as well... until I found out it was under "Works of art and works generally, To". That should be in "Works of art and works generally, From" instead.
I'm also not convinced {{R fictional work}} should be the only template populating "Works of art and works generally, To" once that's fixed, and that it can't fit under "Works of art and works generally, From" instead, but I don't feel strongly about that. I can't get a good grasp on whether those tend to be to or from fictional works because there's some weirdness with the categories (which I've noted at the template's talk page), but it seems like it would better fit in something like "Works of art and works generally, Related" based on the text it itself provides. Skarmory (talk • contribs) 03:44, 15 May 2023 (UTC)[reply]
Adding {{R from remix}}, very similar to the included {{R from cover song}}. Skarmory (talk • contribs) 09:43, 15 May 2023 (UTC)[reply]
 Partly done See changes to template list. As for the grouping suggestions, I like them, but will need a bit more time to implement. In general, the categorization scheme isn't rigorous, but I hesitate to move too many things around since others have come to expect certain items to be in certain places. Wug·a·po·des 22:35, 24 May 2023 (UTC)[reply]

Nomination for deletion of Template:R fictional work

Template:R fictional work has been nominated for deletion. You are invited to comment on the discussion at the entry on the Templates for discussion page. Skarmory (talk • contribs) 10:11, 20 May 2023 (UTC)[reply]

New redirects being too old to patrol

This seems weird, since the pages I'm going to from the new page feed are usually dated within the last couple of days, and other redirects I patrol around that time are fine. I'm pretty confident it's connected to page moves, since pretty much every time I've seen it and was thinking about it, the {{R from move}} template was there too. Is it possible it's picking up on the first item in the log or something?

The exact error message is:

API error: "The revision 1157964250 can't be patrolled as it's too old." [code: notpatrollable]

This was from List of typhoons named Tisoy.

Cheers! Skarmory (talk • contribs) 04:35, 1 June 2023 (UTC)[reply]

R to anchors and sections

Hi Wugapodes. From editing Grant Hehir pointing to Australian National Audit Office#Auditor-General it appears that the bug you mention "Redirects to anchors are not recognized, so it will throw an error at first. Click save again to proceed anyway." also applies to other redirect categoris such as R to section and R to list entry. Best, Sam Sailor 08:23, 24 June 2023 (UTC)[reply]

Rcats with possibilities

There are quite a few not included rcats which currently redirect to a different rcat but could potentially be expanded in the future.

Looking through my edit logs, these are the ones I'm missing in Capricorn the most:

  • 'Orthographic difference, From':
    • R from all caps
    • R from alternative hyphenation
    • R from alternative punctuation
    • R from alternative spacing
    • R from incorrect punctuation
    • R from incorrect spacing
    • R from rearrangement
    • R from The
  • 'Anthroponym, From':
    • R from pen name

AVDLCZ (talk) 23:29, 8 August 2023 (UTC)[reply]

R cs

Another template redirect, R cs, has been created (as if we lacked them), and Capricorn does not read it, see Special:PermaLink/1190323409. Sam Sailor 19:45, 11 January 2024 (UTC)[reply]

@Wugapodes: Follow-up.

Bugs: If a parameter is used with {{R from alternative scientific name}}, Capricorn reads none of the rcats. Example with R from alternative scientific name alone, example with R from alternative scientific name inside Redirect category shell.

Similar with

Suggested changes:

In RedirectAliases.json add

"a2r": "R avoided double redirect",
"R anch": "R to anchor",
"R common": "R to scientific name",
"R hyphen": "R from alternative spelling",
"R low": "R from other capitalisation",
"R member": "R from member",
"R person": "R from person",
"R song": "R from song",
"R the": "R from long name",
"R undab": "R from unnecessary disambiguation",
"R to alt name": "R from alternative name",
"R cs": "Redirect category shell",
"RCS": "Redirect category shell",
"RCATSHELL": "Redirect category shell",
"RCat shell": "Redirect category shell",
"RCat Shell": "Redirect category shell",
"Rcat banner holder": "Redirect category shell",
"Rcatgroup": "Redirect category shell",
"Rcatholder": "Redirect category shell",
"Redirect banner shell": "Redirect category shell",
"Redirect cat shell": "Redirect category shell",
"Redirect category group": "Redirect category shell",

Delete the line

"R from draft": "R from drafts",

insert these instead

"R draft": "R from draft namespace",
"R from draft": "R from draft namespace",
"R from Draft": "R from draft namespace",
"R from drafts": "R from draft namespace",
"R from draftspace": "R from draft namespace",

and in RedirectTemplates.json rename "R from drafts" to "R from draft namespace".

{{R from species to genus}} is no longer an alias/redirect. Delete the line

"R from species to genus": "R from subtopic",

from RedirectAliases.json and add "R from species to genus" somewhere in RedirectTemplates.json.

I hope this finds you well. Best, Sam Sailor 19:17, 13 January 2024 (UTC)[reply]