Template talk:Tld
Jump to navigation
Jump to search
"Tld"? What?
[edit]@Davidgothberg: please clarify what "Tld" means. Chealer (talk) 17:50, 6 October 2024 (UTC)
- @Chealer: It means "Template Link with Data" (meaning "with parameters").
- I (David) created this template over at the English Wikipedia in 2008. Someone then copied the template here (including its history).
- Originally there was the old and widely used {{Tl}} template. We use it when we want to show a template name (and have it link to the same template) for instance when we discuss a template like here on a talk page. For instance if you write "{{tl|example}}" it creates this output: {{Example}}. However the old {{Tl}} template could not show parameters. So I created this template so you now can write for instance "{{tld|example|parameter A|parameter B}}" and get this output: {{example|parameter A|parameter B}}.
- There already was the {{Tlp}} template with the better name that means "Template Link with Parameters" but I didn't like how that template worked so I created this {{Tld}} template. See, if you want to show a template that is fed an empty parameter, like this: {{example|A||C}} (note the second parameter is empty) then you can't use {{Tlp}} since if you write "{{tlp|example|A||C}}" it outputs {{example|A|C}} (it does not show that the second parameter was empty). While if you use my template instead and write "{{tld|example|A||C}}" it correctly outputs {{example|A||C}}.
- Note: These templates work slightly differently over at English Wikipedia where I made them, so I adapted the answer to how they work here at Wikimedia Commons at the moment.
- And the reason for these very short template names is that when you discuss templates, like in this message, you don't want to type a long template name lots of times.
- --David Göthberg (talk) 00:07, 14 October 2024 (UTC), rectified by Chealer in October 2024
- Thank you very much for this extensive answer David. Given that the meaning is far from obvious, would you mind a rename to a clearer title, such as "Parameterized template call with link" or "Template call example code", if we keep (a) shorter version(s) like "PTCWL" or "TCEC" as aliases? --Chealer (talk) 22:40, 14 October 2024 (UTC)
- I will use (()) instead of {{}} in my explanations here since that is easier to type and more robust in case they change/damage the functionality of these templates later (like they did over at English Wikipedia). Some of us who coded and discussed lots of templates started using (()) since that is really the simplest and most efficient solution to all this.
- No, these are shorthand templates that should be kept as short as possible since we often need to type them many times in template discussions and template documentation. They should never be used with a long name, so having the short name just be a redirect to a long descriptive name will cause confusion. But a long descriptive name should of course be in the first paragraph of its template documentation. And ((ptcwl)) or ((tcec)) is not shorter than ((tld). And we have used ((tl)) since 2005, and the other variants since 2006-2008 so they are well established, and used in many different Wikimedia projects (in English Wikipedia they are actually used millions of times).
- But even though I created some of these templates ( ((tlc)), ((tld)), and ((tlf)) ), and updated ((tlp)), I now (since 2010) recommend simply using (()) instead. And just use {{Tl}} on first mention of a template to provide a link to it. And unfortunately I have been proven right. Over at English Wikipedia they have now damaged most of these templates thus breaking thousands of template discussions and hundreds of template documentations. And here people have changed how they work too, which means that when we copy templates between Wikimedia projects the template documentation that comes with them doesn't work as expected. (This is a smaller problem, but still annoying.) And means when you work at several of the Wikimedia projects it becomes confusing.
- --David Göthberg (talk) 18:20, 15 October 2024 (UTC)
- Thank you very much again David. But I struggle to understand why you recommend against a lengthening rename based on the need to type the name if you think that this template should no longer be (further) used. I am highly confident that using aliases which redirect to a (long) descriptive name would cause a lot less confusion than having a cryptic canonical name. Chealer (talk) 02:50, 16 October 2024 (UTC)