User talk:Wugapodes/Capricorn
Installation instructions
editHi, 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)
- @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 useimportScript('User:Wugapodes/Capricorn.js');
Thanks for letting me know! — Wug·a·po·des 04:13, 5 February 2020 (UTC)
Diff
editIs it possible to disable the gadget on diff pages? 1234qwer1234qwer4 (talk) 12:37, 23 February 2020 (UTC)
- 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)
- Implemented in 7 June 2021 revision. — Wug·a·po·des 20:58, 1 February 2022 (UTC)
Typo
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could “Middle-earth topi, Toc” please be changed to “Middle-earth topic, To”, thanks. 1234qwer1234qwer4 (talk) 11:31, 26 February 2020 (UTC)
- That'd be in User:Wugapodes/Capricorn.js, which seems like a simple typo that Wugapodes can fix. ~ Amory (u • t • c) 15:25, 26 February 2020 (UTC)
- Done — Wug·a·po·des 21:35, 26 February 2020 (UTC)
“Geographic name and location”
editMisleading name. This should be “Geographic name and country”, which is more specific regarding the disambiguative qualifier. 1234qwer1234qwer4 (talk) 14:40, 17 March 2020 (UTC)
Namespaces, To
editWriting 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)
Redirects with non-rcat templates
editI'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)
Lowercase title
editCapricorn 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)
- @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)
short description
edit@Wugapodes: Special:Diff/1068669047. ~~~~
User:1234qwer1234qwer4 (talk) 19:07, 29 January 2022 (UTC)
Better detection of if a redirect is not marked as patrolled
editHey 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)
R from cover song
edit{{R from cover song}} is not supported? --Muhandes (talk) 13:30, 25 December 2022 (UTC)
- Might want to ping @Wugapodes for that. FWIW the template only has 165 transclusions. 1234qwer1234qwer4 20:49, 29 January 2023 (UTC)
- Done thanks for the ping. — Wug·a·po·des 19:33, 30 January 2023 (UTC)
Suggestion to add target link
editI 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)
- Hi Compassionate727, you can click on the
Read
tab and you get redirected irregardless. J947 † edits 07:52, 18 February 2023 (UTC)- Pro tip: access key c (or t if the redirect is a talk page). 1234qwer1234qwer4 20:14, 29 March 2023 (UTC)
Specific domain names?
editIs 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 (talk • edits) 16:13, 26 April 2023 (UTC)
- 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)
- yeah, I knew that. Specific domains such as .com need template parameters, though. 137a (talk • edits) 15:33, 28 April 2023 (UTC)
Not included rcats
editThere 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)
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)
- There is also R from second-level domain, which can go under 'Related information, From' 137a (talk • edits) 13:08, 12 May 2023 (UTC)
- 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)
- Adding {{R from remix}}, very similar to the included {{R from cover song}}. Skarmory (talk • contribs) 09:43, 15 May 2023 (UTC)
- 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)
Nomination for deletion of Template:R fictional work
editTemplate: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)
New redirects being too old to patrol
editThis 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.
R to anchors and sections
editHi 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)
Rcats with possibilities
editThere 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
R cs
editAnother 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)
@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
- {{R avoided double redirect}}, example
- {{R from misspelling}}, example
- {{R to scientific name}}, example
- Yes, handling rcats with parameters has been an issue for a while, see the TODO on line 218. Iirc parameters were less common in rcats a few years ago, so it wasn't much of an issue but it seems that they're becoming more widespread. I'll put some thought into how to handle them. — Wug·a·po·des 19:53, 25 April 2024 (UTC)
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)
Addendum:
- {{R from creator}} is new. Presently it has no aliasses. Sam Sailor 21:22, 13 January 2024 (UTC)
- {{R from RFC}} is new. It has an alias from {{R rfc}}. Sam Sailor 13:12, 14 January 2024 (UTC)
- {{R from historic name}} was merged into {{R from former name}}. Sam Sailor 15:50, 14 January 2024 (UTC)
R from Eastern name
editI think this rcat should be added to the tool as it is quite useful and very underused as I feel most users don't know it exists - including me until about 5 mins ago! harrz talk 20:03, 28 February 2024 (UTC)
Feature request
editIt'd be great to be able to create redirects with the script! — Frostly (talk) 21:49, 3 March 2024 (UTC)
- Hi Frostly, you can! When you're in the "Creating <page name>" editor, the Capricorn symbol (♑) should appear next to the page title. If you click on that, it will open the usual interface for you to create a redirect. — Wug·a·po·des 19:59, 25 April 2024 (UTC)
better instructions, please
editThe green interface seems comprehensive, but it provides no warning/ instruction as when an rcat should not be applied. I've had to revert many of my uses of Capricorn because of this misunderstanding. Chris Troutman (talk) 20:50, 22 March 2024 (UTC)
- Hi Chris troutman, honestly this probably won't be added any time soon. The script is in more of a maintenance phase so the limited time I have for it is mostly spent fixing bugs and updating template data rather than adding new features. In the meantime, if editors are routinely misunderstanding a template, I'd recommend educating the user or trying to redefine the scope of the template so that it's more intuitive to use. — Wug·a·po·des 20:09, 25 April 2024 (UTC)
R from lyrics
editIt appears that R from lyrics isn't on here. That being said when you do use twinkle to tag it with r from lyric capricorn will think it's r from related word Okmrman (talk) 22:55, 20 April 2024 (UTC)
- @Wugapodes I think u might need to check this page since there might be a number of topics you have missed. Okmrman (talk) 23:00, 20 April 2024 (UTC)
- oh yeah you also need to add {{R from company}} Okmrman (talk) 21:55, 21 April 2024 (UTC)
- Done Thanks for the ping. — Wug·a·po·des 20:18, 25 April 2024 (UTC)
- oh yeah you also need to add {{R from company}} Okmrman (talk) 21:55, 21 April 2024 (UTC)
more R templates
edit{{R from Roman numerals}} {{R from subsidiary}} Okmrman (talk) 15:58, 26 April 2024 (UTC)
Courtesy notice of RM
editHi Wugapodes -- I noticed that {{R from gender}} is listed in RedirectTemplates.json, so I just wanted to drop you a courtesy note that I've proposed that the template is moved to {{R from gendered term}}: Template talk:R from gender § Requested move 1 May 2024. All the best, —a smart kitten[meow] 09:37, 1 May 2024 (UTC)
R from alternative hyphenation
editHi @Wugapodes, I think that {{R from alternative hyphenation}} isn't included in Capricorn. Just letting you know. Thanks! Fork99 (talk) 06:00, 4 May 2024 (UTC)
Creating redirects only works when &redlink=1 is at the end of the URL
editHi @Wugapodes, I noticed that when directly clicking on a redlink such as Example red link, the button to create the page with Capricorn appears as it should. However, if I open the page directly at [1] and try to create it, it doesn't show up because clicking "Create" doesn't append &redlink=1 to the &action=edit URL, which is checked for at line 932. I don't know if there's another way of checking if an article exists or not, but if there is I would really appreciate it, since my workflow for creating redirects is usually editing the URL in my browser bar to navigate to that page directly rather than clicking on redirects. Thanks! Pinguinn 🐧 09:23, 20 August 2024 (UTC)