Template talk:Sportname at the YYYY Summer Olympics category
Appearance
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Handling redirects
[edit]@BrownHairedGirl: this seems to need tweaking to handle redirects. Please see the history of Category:Artistic swimming at the 2020 Summer Olympics, and note that its parent is being renamed, so the preceding cats will have the problem shortly. – Fayenatic London 16:02, 26 March 2021 (UTC)
- @Fayenatic, please can you be more specific about the history, and about which category is being renamed to what? --BrownHairedGirl (talk) • (contribs) 16:14, 26 March 2021 (UTC)
- Timrollpickering subst'd and edited the template to stop it populating Category:Artistic swimming at the Summer Olympics. His version is not perfect as it links to synchronised rather than artistic in 2020 as the main article. Now Category:Synchronized swimming at the Summer Olympics is being renamed to Artistic. Hope that suffices... – Fayenatic London 16:19, 26 March 2021 (UTC)
- OK, Fayenatic, I have done these two edits[1][2] to deploy {{Resolve category redirect}}, which I think should do it. However, this has quite far-reaching consequences across the rest of the Olympics category tree, and it may require the creation of some new category redirects.
- I really really wish that Timrollpickering could be dissuaded from substing category header templates. It provides a crude fix one for the populated-redirect issue, but creates a maintenance nightmare. --BrownHairedGirl (talk) • (contribs) 17:03, 26 March 2021 (UTC)
- Thanks, @BrownHairedGirl: the parenting in prior years works fine. How about the "synchronized swimming" link in the Events box at Category:Artistic swimming at the 2020 Summer Olympics? It links to the redirect; can this template be altered to display as well as link to the updated name after 2017? – Fayenatic London 16:20, 28 March 2021 (UTC)
- @Fayenatic, the relevant code is at Template:Events at the YYYY Summer Olympics category navigation/core. In these two edits[3] I set it to resolve the redirect for Synchronized swimming. Getting it to change the displayed title would be a big job, adding a lot of complexity. --BrownHairedGirl (talk) • (contribs) 16:35, 28 March 2021 (UTC)
- Thank you again, I think that method is fine, especially as the rest of the category hierarchy still uses the old name. It's not too hard to create a redirect every four years; perhaps this implied requirement of the current template should be documented?
- Looking at that Events template, it's so repetitive that I'm a little surprised you didn't create a "row" sub-template to be called for each sport. If it was done that way, it might be quite easy to handle changes of name, and sports that only featured for a range of years.– Fayenatic London 16:57, 28 March 2021 (UTC)
- @Fayenatic, the relevant code is at Template:Events at the YYYY Summer Olympics category navigation/core. In these two edits[3] I set it to resolve the redirect for Synchronized swimming. Getting it to change the displayed title would be a big job, adding a lot of complexity. --BrownHairedGirl (talk) • (contribs) 16:35, 28 March 2021 (UTC)
- Timrollpickering subst'd and edited the template to stop it populating Category:Artistic swimming at the Summer Olympics. His version is not perfect as it links to synchronised rather than artistic in 2020 as the main article. Now Category:Synchronized swimming at the Summer Olympics is being renamed to Artistic. Hope that suffices... – Fayenatic London 16:19, 26 March 2021 (UTC)
Adding logic for 2020 Summer Olympics
[edit]We should probably add logic specifically for the 2020 Summer Olympics because, say, Category:Weightlifting at the 2020 Summer Olympics should be in Category:2021 in weightlifting and not in Category:2020 in weightlifting. - Simeon (talk) 10:24, 20 July 2021 (UTC)