Jump to content

Template talk:Rugby union team

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Rut/doc)

Why are there so many individual templates?

[edit]

Can someone please help me understand why there are so many individual Rut templates, many of which are unused? It seems to me that instead of:

{{Rut Eastern Province Kings|abb=y|fb=y}}

it would be much easier to manage a single template, transcluded like this:

{{Rut|Eastern Province Kings|abb=y|fb=y}}

That would allow there to be a single template, {{Rut}}, instead of dozens of individual templates that are all essentially the same. – Jonesey95 (talk) 18:23, 6 December 2021 (UTC)[reply]

Jonesey95, the majority were created by a previous rugby editor who no longer edits, however loads are still in use and continue to be used today in player articles, lists and tournament pages. I'd oppose any change that would effect any of these templates unless they are all corrected by a bot or manually by those that want the change. Personally I like to use them as it saves having to type of long winded team names and names that include accents etc. Primefac has just extended some of the Rut templates for U20 rugby sides as well, and there are further templates for international sides and international sevens sides that would have to be changed as well, but personally I'd keep as is as I don't believe there's really a problem here that needs solving. Rugbyfan22 (talk) 18:34, 6 December 2021 (UTC)[reply]
unless they are all corrected by a bot... that's generally my cue to step into the discussion ;-) I see your point, Rugbyfan22, but I would argue Rut Eastern Province Kings is exactly the same number of characters as Rut|Eastern Province Kings.
I'm not sure which U20 template(s) you're referring to, other than potentially {{nruu}}, but that was one template that allows for any country's under-X team to be linked. This, I think, is Jonesey's point. Granted, the {{nrut}} family of templates is simple because you're just linking to a country, as opposed to a team or province that might have fancy formatting, but it's easy enough to have a switch statement that can match what is currently called as a template with what that template currently puts out. (please do not ping on reply) Primefac (talk) 19:56, 6 December 2021 (UTC)[reply]
Yeah the {{nruu}} templates were the one I was referring to. If it can easily be sorted I don't have an issue with the change. My concern is broken links from changes not being updated given that all the templates would have to be changed from Rut Eastern Province Kings to just Rut| and therefore them all being different templates. Similar would have to be done with the {{Rus}} templates as well to match. I'm still of the opinion there's no real problem to fix here. Obviously if there's any unused templates they should be put up for deletion discussion and cleaned up, but other than there being lots of them I don't see an issue given that rugby editors seem to be able to navigate them fine. Rugbyfan22 (talk) 20:09, 6 December 2021 (UTC)[reply]
I've speedy deleted a handful that I've previously created than are unused and no longer needed, and TfD's another three. Rugbyfan22 (talk) 21:12, 6 December 2021 (UTC)[reply]
Thanks for the responses. The basic problem is that there are dozens of templates when only one ({{Rut}}) may be needed. That creates a maintenance burden for bots and gnomes when MediaWiki software changes are made that require changes to templates, categories, and other pages. Having to change only one template instead of dozens is a good thing. Sorry for not explaining that above, but I wanted to keep my question simple in case there was something fundamental that I was missing. P.S. How does having a Rut template for an individual team help save typing or keystrokes? I don't get it. – Jonesey95 (talk) 22:48, 6 December 2021 (UTC)[reply]
Honestly, all of them should just go. I don't see any reason why we need templates to perform the function of simple wikilinks. – PeeJay 00:52, 7 December 2021 (UTC)[reply]
With nearly 5,000 transclusions, it appears that people find them useful. And some of them, such as those used at 2006 Air New Zealand Cup and 1977 National Provincial Championship, do more than render wikilinks. – Jonesey95 (talk) 02:35, 7 December 2021 (UTC)[reply]
Are you referring to those little icons that are an absolute violation of MOS:ICON? – PeeJay 09:53, 7 December 2021 (UTC)[reply]
They're certainly useful for when team names are long, feature disambiguation or feature accents or similar. For example it's far easier to type just {{Rut Tasman}} instead of Tasman (National Provincial Championship) or {{Rut Aurillac}} instead of Stade Aurillacois Cantal Auvergne. If there's a way of just having one template with all the teams added to it then I'm happy for that as long as all those that are in use are corrected. Rugbyfan22 (talk) 10:34, 7 December 2021 (UTC)[reply]
It's easier than ever to insert correct links just by clicking the link icon in the editing toolbar. Using templates instead of wikilinks is sheer laziness. – PeeJay 12:05, 7 December 2021 (UTC)[reply]
You can do it that way, but the use of a template still helps simplify editing. You could say using twinkle or hotcat are also lazy, but we still have them as they simplify editing, and not everybody is going to know about the links toolbar. When I first started editing regularly I used what other editors had used as examples, and anything that would help make editing easier, such as these templates or others, I'd use. Rugbyfan22 (talk) 12:14, 7 December 2021 (UTC)[reply]
But if these templates didn't exist, I'd wager you'd have learned to use wikilinks correctly and wouldn't have a problem with it at all. Templates require transclusion, which puts a strain on the servers. I'm pretty sure there are guidelines against using templates for this purpose. – PeeJay 13:21, 7 December 2021 (UTC)[reply]
There aren't. "Killing server kittens" is (by and large) more FUD than actual issue, unless you're discussing massive pages or huge templates. This template is neither. That being said, as mentioned below there are instances where templates like these have been deleted for "being unnecessary", so if you feel that strongly about it you are welcome to nominate them for deletion. Primefac (talk) 13:24, 7 December 2021 (UTC)[reply]
Hmm, I must have Mandela-ed the server thing. Nevertheless, I maintain that using templates in this way is pretty lazy. If all you're doing is replacing a wikilink, just use a link. If it's hard to remember what the direct link is, that's why we have redirects (and other editors to fix any errors). The football equivalents of these were deleted for a good reason, and it's high time we dispensed with these too. – PeeJay 16:15, 7 December 2021 (UTC)[reply]
Sure, just a quick look at the code and the first easy change would be converting [[{{{tan}}}|{{:#if:{{{abb|}}}|{{{abb}}}|{{{t}}}}}]] into a switchable statement, e.g.
{{#switch: {{{t}}}
 | Tasman = [[Tasman (National Provincial Championship)...
 |...
(for the Tasman example you give), because you're absolutely right that we should be making stuff easier for folks to type out. Obviously if we agree to do this change it would be sandboxed and tested first before any implementation ;-) Primefac (talk) 10:44, 7 December 2021 (UTC)[reply]
Ok thanks for this Primefac. Would this also work for old team names/sponsor common name teams as per the current {{Rut}} documentation. I'd happily support a change like this if properly implemented, but would oppose their removal entirely. Rugbyfan22 (talk) 10:53, 7 December 2021 (UTC)[reply]
The creation documentation of {{Rut}} states it was similar to a football template (Fb team). I can't seem to find these templates anymore. Have they been superseded or removed entirely? Rugbyfan22 (talk) 10:55, 7 December 2021 (UTC)[reply]
That's because they were deleted following this TFD.
And yes, a switch statement can have multiple "positive" results, for example | OptionA | OptionB | OptionC = OutputX will give "OutputX" for any of those three inputs. Primefac (talk) 11:10, 7 December 2021 (UTC)[reply]
Thanks Primefac, can I also what those football templates were replaced with, interested to see if there's an example we could use here. But so far I think the code change you've suggested could work fine as long a cleaned up in articles correctly. Rugbyfan22 (talk) 11:13, 7 December 2021 (UTC)[reply]
That particular template group was orphaned, with the template calls being replaced by their text (example). Primefac (talk) 11:22, 7 December 2021 (UTC)[reply]
Ok thanks, I'd oppose going back to text as for what I mentioned above with long team name, accents etc. These templates help and simplify editing and so should be kept in some form, but just having one with all the different teams included in it I would support and would also support the same being done to {{Rus}} and international sides templates as well. Rugbyfan22 (talk) 11:28, 7 December 2021 (UTC)[reply]
Yeah, I think the intention here is to condense a bunch of (what some would consider) unnecessary wrapper templates into one main/singular location. Primefac (talk) 11:30, 7 December 2021 (UTC)[reply]
Yeah, and I'm happy with that as long as the tidy-up is completed as I mentioned above, PeeJay just mentioned his view that they should be removed entirely, and I'm just saying i'd totally oppose that. Rugbyfan22 (talk) 11:40, 7 December 2021 (UTC)[reply]
This isn't a super-high priority for me right now, but I can start working on this when I get an opportunity. Primefac (talk) 11:46, 7 December 2021 (UTC)[reply]
Thanks Primefac, don't think there's any hurry over this given there's not a major problem here (other than there being lots of them) and that realistically it's probably only going to effect a handful of editors who use them regularly. Rugbyfan22 (talk) 11:51, 7 December 2021 (UTC)[reply]

I've got a working module in the sandbox, testcases look good; only major changes I can think of would be to go through and update some links that are now redirects. If there aren't any major issues I can probably start converting uses, which is literally going from {{Rut XYZ...}} to {{Rut|XYZ...}}. Primefac (talk) 10:20, 15 December 2021 (UTC) Found some flaws. Reworking it. Primefac (talk) 09:58, 18 December 2021 (UTC)[reply]

Okay, flaws worked through, tweaked a few things, and updated the main template to take the new sandbox code. If all looks good in the next few days, I'll start converting {rut X} templates to {rut|X}. Primefac (talk) 00:36, 27 December 2021 (UTC)[reply]
Thanks for taking this on. It should simplify things considerably. – Jonesey95 (talk) 01:55, 27 December 2021 (UTC)[reply]
Is the plan to do the same for the Rus templates as well, which work in the same way, but for stadia instead of teams? Rugbyfan22 (talk) 10:51, 27 December 2021 (UTC)[reply]
I didn't know those templates existed, so... no? But I can look into them after this is done. Primefac (talk) 11:35, 27 December 2021 (UTC)[reply]
Thanks Primefac, they work in exactly the same way, but for stadia as far as I'm aware. Would just make sense to do them as well considering they have the same issue as the Rut templates. Rugbyfan22 (talk) 11:58, 27 December 2021 (UTC)[reply]
Hi, Primefac, not sure if any changes have been implemented yet, but it seems to have effected the {{Rut Sharks (Currie Cup)}} template, which is now linking to the wrong page (links to Sharks (rugby union) instead of Sharks (Currie Cup)) can't see any changes in the template, maybe an issue with teams of the same name. Rugbyfan22 (talk) 18:41, 27 December 2021 (UTC)[reply]
Likely a switch value missing, will look into it pronto. Primefac (talk) 18:46, 27 December 2021 (UTC)[reply]
Thanks, not great with the language of these things so can't see it myself, other templates such as {{Rut Sharks XV}} and {{Rut Sharks U21}} seem fine. Rugbyfan22 (talk) 18:48, 27 December 2021 (UTC)[reply]
Yeah, the way {{Rut Sharks (Currie Cup)}} is set up it was triggering the wrong outcome; added an extra #if and that seems to have sorted it. Primefac (talk) 18:58, 27 December 2021 (UTC)[reply]
Thanks Primefac, seemed to be linking to the Sharks XV bit of the page unnecessarily for the link so have removed that bit from the text. Works fine now. Rugbyfan22 (talk) 19:29, 27 December 2021 (UTC)[reply]
Meh, that's what I get for trying to do things too quickly. Few other tweaks to the slinks made. Primefac (talk) 19:33, 27 December 2021 (UTC)[reply]
I've been through and fixed some notable redirects that I know of (particularly of Japanese sides who all changed name in 2021, and a few other historic ones). Rugbyfan22 (talk) 19:46, 27 December 2021 (UTC)[reply]
Ta, that was supposed to be on my list of things to do after I got things running, but between finding the issues the first go-round and this time I seem to have forgotten. Primefac (talk) 19:53, 27 December 2021 (UTC)[reply]
I may well have missed a few so may be worth still going through them. Rugbyfan22 (talk) 19:58, 27 December 2021 (UTC)[reply]

Missing flag

[edit]

Not sure where else to ask this, but is anyone able to fix the issue with the North Otago flag icon, please? Since the rut templates have been changed, this icon is followed by the text "[[Image:|14px|border]]". I thought it was because the Template:Rut North Otago didn't include the actual file of the flag icon. So I added this file, but it hasn't solved the issue. Removing the text "[[Image:|14px|border]]" seems to remove the flag icon, despite the png file now being included in the Rut North Otago template. I don't have sufficient knowledge of – and experience with – these technical issues, so I don't feel comfortable trying something else. I'd rather leave that to more experienced editors. The North Otago flag icon appears (at least) on the following pages: Template:Ranfurly Shield 2021 Hawke's Bay vs North Otago and Ranfurly Shield 2020–2029. I haven't checked other pages. Many thanks. Ruggalicious

 Fixed. Thanks for the detailed report. Post here if you find any others. – Jonesey95 (talk) 01:52, 5 January 2022 (UTC)[reply]
There were a few more of these broken links, which I fixed with these edits to Rut/link and these edits to Rut/image. I added tracking to those templates to add Category:Pages using Rut template with unknown parameters when team names were missing from those two templates, and then I null-edited all of the pages using {{Rut}}. The tracking category is empty now. At this point, I believe that all team names that were in use before this conversion are functioning, and we should be able to delete the individual templates. It appears that while I was contemplating and composing this message Primefac put together the TFD. Feel free to contribute there. – Jonesey95 (talk) 20:37, 8 January 2022 (UTC)[reply]
For what it's worth the template is technically set up so that even teams that are not in the /link subpage can still theoretically be linked to, but I do suppose it's a good idea to keep track of these pages (especially if a particular team starts getting used frequently enough to merit being added to the switch). Primefac (talk) 20:44, 8 January 2022 (UTC)[reply]
It was not working in the articles that triggered the error-tracking category: {{Rut|Foobar}} → [[|Foobar]]. – Jonesey95 (talk) 21:52, 8 January 2022 (UTC)[reply]
Ah, fair point. The |tan= parameter needs to be given, so something like {{Rut|Auto and General Lions|tan=Golden Lions}} does give the proper output of Auto and General Lions, which I suspect is likely to be the most-often case of the team (i.e. |1= or |t=) not being in the #switch. Primefac (talk) 21:59, 8 January 2022 (UTC)[reply]

Support for parameter CC

[edit]

It appears that we may need support for a |CC= parameter, or conversion of its use by AWB or bot. See {{Rut Sharks (Currie Cup)}} for an example of how it is used. It appears that there are about 250 articles that use this parameter. – Jonesey95 (talk) 02:07, 5 January 2022 (UTC)[reply]

For reference, in {{Rut Sharks (Currie Cup)}}, setting |CC=y results in the display being "Sharks (Currie Cup)", otherwise it just shows "Sharks". In the new centralised template, if {{Rut|Sharks (Currie Cup)}} is given, it shows as "Sharks (Currie Cup)".
I guess my question is - are these 250 uses the only uses of {{Rut|Sharks (Currie Cup)}}? If so, the CC can be ignored and/or removed, because adding in that functionality will not actually have a substantial impact. Primefac (talk) 22:11, 5 January 2022 (UTC)[reply]
The distinction is that the {{Rut Sharks}} and {{Rut Sharks (Currie Cup)}} are separate teams, with the Sharks competing in the URC tournaments (franchise competitions), while the Currie Cup side (formerly the Natal Sharks, before the Natal bit was dropped) is the more traditional side. I imagine the CC=y function was included so where players who played for both the franchise and traditional side at the same time wouldn't be listed as playing for the Sharks and the Sharks and so in infoboxes would be listed as playing for the Sharks and Sharks (Currie Cup). Personally I'd prefer if {{Rut Sharks (Currie Cup)}} just showed Sharks with the CC paramaeter implemented like before. Rugbyfan22 (talk) 13:53, 8 January 2022 (UTC)[reply]
So just to clarify, you are of the opinion that {{rut|Sharks (Currie Cup)}} should have an option to display as "Sharks" as well as Sharks? Primefac (talk) 14:27, 8 January 2022 (UTC)[reply]
For the way the template is used yes. For example in 2022 Currie Cup Premier Division it should display as Sharks, however in player articles such as Lukhanyo Am it should display as Sharks (Currie Cup) to clarify the separate teams. Rugbyfan22 (talk) 17:18, 8 January 2022 (UTC)[reply]
Sorry to flap about playing 20 questions, but for the purposes of the Sharks should we default to "Sharks" if CC ≠ y OR |CC= is not even provided? In other words, what is our "default" for {{rut|Sharks (Currie Cup)}}? There are a few different ways of handling this but it really depends on the specifics.Primefac (talk) 17:29, 8 January 2022 (UTC)[reply]
The default should be {{Rut|Sharks (Currie Cup)}} resulting in the output Sharks. If the coding doesn't work to add a CC option with the updated template, then infoboxes can be updated, but the default output should be just Sharks IMO. Rugbyfan22 (talk) 18:23, 8 January 2022 (UTC)[reply]
 Done. Primefac (talk) 18:42, 8 January 2022 (UTC)[reply]
Many thanks Primefac, and for the tidy-up you've done. As I've said previously it's probably worth doing the same to the Template:Rus templates as well, but given the time it's taken for you I don't think there's any real hurry in doing this. Rugbyfan22 (talk) 20:32, 8 January 2022 (UTC)[reply]
Yeah, I've only managed about six hours of internet access this last week, so I've had my priorities in other places, but this is on my list. Primefac (talk) 20:45, 8 January 2022 (UTC)[reply]

Examples need fixing

[edit]

The examples can't be correctly set up. They have multiple if blocks in them. I don't understand anything about this template to fix them myself, but I'm sure someone here does. Gonnym (talk) 21:48, 8 January 2022 (UTC)[reply]

Actually, they are set up correctly, though for a system that is shortly being deleted - the section in question (which I've removed) was added in 2013 as an explanation on how to set up a team-specific template (which are being deleted). Primefac (talk) 21:52, 8 January 2022 (UTC)[reply]

Future Additions

[edit]

Just for future reference, if I wanted to add another new team/team name change to the Rut template I'd add said team to the Template:Rut/link document, or is there another easier/simpler way of doing so? Rugbyfan22 (talk) 12:15, 9 January 2022 (UTC)[reply]

Yes, or you can post a request here. I have modified the documentation. – Jonesey95 (talk) 13:31, 9 January 2022 (UTC)[reply]

Sandbox update and question

[edit]

I've edited the /sandbox to get rid of [[|]] results when no value is given, but I also noticed that in the /testcases the results are in <pre>...</pre> tags. Is this intentional? Gonnym (talk) 12:45, 9 January 2022 (UTC)[reply]

I suspect that there is an extra space in the live template that should not be there, and that space unintentionally starts the output line with a space, making the result show in monospace. Just a guess. There also seem to be spaces missing in some cases, separating the image from the name. – Jonesey95 (talk) 13:30, 9 January 2022 (UTC)[reply]
Fixed the space issue in the /sandbox. If there isn't something I missed I'll sync to live. Gonnym (talk) 21:42, 9 January 2022 (UTC)[reply]
Does {{Rut/sandbox}} with an empty 1= still emit Category:Pages using Rut template with unknown parameters when used in article space? It should continue to do so, but my brief experimenting could not make it happen. – Jonesey95 (talk) 22:37, 9 January 2022 (UTC)[reply]
Yes. It's mainspace only so make sure you test it in that namespace. Gonnym (talk) 15:57, 31 January 2022 (UTC)[reply]

Name change

[edit]

Any opposition to changing this template to {{rugby union team}} for improved clarity? Obviously {{rut}} would still be usable as a template redirect. Primefac (talk) 13:35, 31 January 2022 (UTC)[reply]

I support moving this template to a more comprehensible name, following the pattern of template renamings like {{tlx}}. Definitely leave a redirect because it is much easier to type and people are used to it. – Jonesey95 (talk) 15:56, 31 January 2022 (UTC)[reply]
No opposition to this name change, same comments as at Rus templates. Rugbyfan22 (talk) 18:43, 31 January 2022 (UTC)[reply]

I don't know anything about rugby. However, I have noticed that the table in David Pocock was reading off this template but is not showing up the Western Force wikilink correctly. Marcnut1996 (talk) 06:18, 12 April 2022 (UTC)[reply]

I see {{Rut|Force}}Force in the infobox, which to me appears correct? Primefac (talk) 06:49, 12 April 2022 (UTC)[reply]
 Fixed. – Jonesey95 (talk) 14:34, 12 April 2022 (UTC)[reply]

Missing flag for new addition

[edit]

Hi, I've just added a new template for the updated team name of Urayasu D-Rocks. Can somebody pick out what I've done wrong here and correct for me. Flag should display the Japanese flag for clarity. Thanks Rugbyfan22 (talk) 15:22, 30 October 2022 (UTC)[reply]

Not sure what you mean, these diffs look like they've been made properly. Primefac (talk) 15:54, 30 October 2022 (UTC)[reply]
I was wondering why the flag was missing, too. I really don't know anything about it, so maybe this is a stupid suggestion, but should the new name be added (not substituted) in the source of Template:Rugby union team/flags? Ruggalicious (talk) 23:27, 30 October 2022 (UTC)[reply]
Oh, yeah, the new name should be added to the /flags template as well. There wasn't really a good way to have the names and flags in the same template without things getting really messy. Primefac (talk) 10:31, 31 October 2022 (UTC)[reply]
Thanks guys, can we add a link to the flags page to this main page so it's easier to find. I'll inevitably forget to do it again next time I have to create one. Rugbyfan22 (talk) 20:04, 31 October 2022 (UTC)[reply]
Weird, thought it was there. Is there now. I'm debating adding a list of current teams, but it might be long and annoying to upkeep (as I keep finding with some of my Olympics-related switch templates). Primefac (talk) 20:22, 31 October 2022 (UTC)[reply]
[edit]

I have just removed a number of duplicate keys but have found some I am not sure how to handle

the key 'University of Canberra Vikings' occurs twice

| Canberra Vikings | University of Canberra Vikings | UC Vikings | CV = [[Canberra Vikings{{{slink|}}}|{{#if:{{{abbr|}}}|CV|{{{linkText}}}}}]]
| University of Canberra Vikings | UCV = [[Canberra Vikings{{{slink|}}}|{{#if:{{{abbr|}}}|UCV|{{{linkText}}}}}]]

The bold font is for emphasis.

Note that the first has the code CV and the second UCV

#switch always takes the first key it comes across - in this case the code will be CV

Is that intended? Desb42 (talk) 12:01, 19 July 2023 (UTC)[reply]

No, if someone wants to refer to the UC Vikings it should say UCV, so the first instance should probably be removed and "UC Vikings" moved to the second grouping. Primefac (talk) 13:48, 20 July 2023 (UTC)[reply]