Template talk:Template category
This is the talk page for discussing improvements to the Template category template. |
|
Archives: 1Auto-archiving period: 3 months |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Visit the testcases page to see examples of parameter use. |
Remove emphasis of description line
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The emphasis is too much and does not look good. From this:
Templates relating to FooTopic. This text emphasis is too much 2000s style The pages listed in this category are templates.
This page is part of Wikipedia's administration and not part of the encyclopedia.
Further template category notes
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. To add a template to this category:
|
To this:
{{Cmbox
| type = notice
| style = padding-bottom:0.5em;
| image = [[File:Curly Brackets.svg|44px|Template braces|alt=|link=]]
| text = <div>
<table style="width:98%; background:none; border-collapse: collapse;"><!--
Container-category message
-->{{ifaffirmed|1=
|2=<tr><td style="font-size:115%;padding:0.5em 0;"> '''''Note: Please do not add templates to this category; instead, use one of its subcategories.''''' </td></tr>
}}<!--
(type/)topic/description
-->{{#if:FooTopic
| <tr><td> <!--
-->{{#if:FooTopic |'''{{#switch:{{lc:{{{type}}}}} |navbox|navigation|navigational|infobox|sidebar={{ucfirst:{{{type}}}}} templates |#default=Templates}} relating to FooTopic.''' Looks better now.
| <div><!--(in case 1/description begins with newline:)--> This text emphasis is too much 2000s style </div>
}} </td></tr>
}}<!--
type --><tr><td style="line-height:1.3em;padding-top:0.3em;"> <!--
-->{{#if: <!--
(then:)-->| <div style="font-size:95%;font-weight:bold;"> The pages listed in this category are meant to be <!--
-->{{#switch:{{lc:{{{type}}}}}
| ambox = [[Wikipedia:Manual of Style/Article message boxes|article message box (ambox)]] templates
| campaignbox = [[Wikipedia:Manual of Style/Military history#Campaignboxes|campaignbox]] templates
| conversion = templates that perform [[Wikipedia:Manual of Style/Dates and numbers#Unit conversions|conversions]]
| external link = templates providing [[Wikipedia:External links|external links]]
| formatting = templates that provide [[Wikipedia:Formatting|formatting]]
| function = function templates{{nobold|, i.e. templates that produce text, images or other elements}}
| infobox = [[Help:Infobox|infobox]] templates
<!-- | message = [[Wikipedia:Template messages|message]] templates -->
| meta = [[Help:Metatemplating|metatemplates]]
| navigation |navigational |navbox = [[Wikipedia:Navigation templates|navigation]] templates
| sidebar = [[:Category:Sidebar templates|sidebar]] templates
| stub = [[Wikipedia:WikiProject Stub sorting/Stub types|stub]] templates
| sub = [[Help:Subtemplates|subtemplates]]{{nobold|, i.e. templates used by another template or templates}}
| timeline = [[Wikipedia:Timeline|timeline]] templates
| userbox = [[Wikipedia:Userboxes|userbox]] templates
| #default = This text emphasis is too much 2000s style
| {{{type}}} templates
}}. </div><!--
(else:)-->| <div style="font-size:95%;font-weight:bold;"> The pages listed in this category are [[Wikipedia:Templates|templates]]. </div>
<div style="font-size:95%;padding:0.15em 0;line-height:1.3em;"> This page is part of [[:Category:Wikipedia administration|Wikipedia's administration]] and not part of the encyclopedia. </div> {{#if:|<hr/>{{{ALTTEXT}}}<hr/>}}
}}
<!--
Further template category notes
--><table class="collapsible collapsed" style="width:100%;font-size:90%;padding-top:0.25em;background:transparent;line-height:1.3em;">
<tr><th style="border-bottom:1px solid #aaa;text-align:left;"> Further template category notes </th></tr>
<tr><td> This [[Help:Category|category]] contains pages in the [[Wikipedia:Template namespace|template namespace]]. It should not be used to categorize [[Wikipedia:What is an article?|articles]] or pages in other [[Help:Namespace|namespaces]]. </td></tr><!--
Help subsection
--> <tr> {{#if: <!--
(then:)-->| {{ifdeclined| |{{#if:|<td>{{{2}}}</td>}} |<td>{{{help}}}</td>}}<!--
(else:)-->| <td> To add a template to this category:
{{Unbulleted list |list_style=padding-left:1.4em;
| If the template has a separate documentation page (usually called "Template:''template name''/doc"), add
| {{pad}}{{mono|[[{{FULLPAGENAME}}]]}}
| to the <nowiki><includeonly></nowiki> section at the bottom of that page. Otherwise, add
| {{pad}}{{mono|<noinclude>[[{{FULLPAGENAME}}]]</noinclude>}}
| to the end of the template code, making sure it starts on the same line as the code's last character.
}} </td> }} </tr>
</table> <!--(end "Further template category notes" table)
--></td></tr> <!--(end of "type" row)-->
</table> </div> <!--(end containing table and |text=<div>)-->
}}{{#ifeq:{{NAMESPACE}}|{{ns:14}}
| [[Category:Wikipedia template categories]]
}}
By changing code from
<tr style="background:#d5e4ed;line-height:1.5em;"><td style="border:1px solid #aaa;font-size:120%;padding:0.35em;">
to
<tr><td>
Golopotw (talk) 18:33, 10 July 2017 (UTC)
- Not done: please establish a consensus for this alteration before using the
{{edit template-protected}}
template. (It may really end up not being a problem. But I'd rather not make this change until and unless you have some additional support.) StevenJ81 (talk) 21:28, 11 July 2017 (UTC)
Removing unnecessary redirect
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
[[Wikipedia:Navigation templates|navigation]] --> [[Wikipedia:Navigation template|navigation]]
Pipiing direct to the target instead of via a redirect. Colonies Chris (talk) 12:14, 6 October 2017 (UTC)
- Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. The line of code which produces the link...
-->{{#if:{{{topic|}}} |'''{{#switch:{{lc:{{{type}}}}} |navbox|navigation|navigational|infobox|sidebar={{ucfirst:{{{type}}}}} templates |#default=Templates}} relating to {{{topic}}}.''' {{{1|}}}{{{description|}}}
- ...produces a number of links, not just the one you complain about. You'd need to set up other redirects to catch the other altered outcomes from the change you request. If you have a fix in mind that doesn't break stuff, please show with sandbox & testcases. Regards, Cabayi (talk) 14:40, 6 October 2017 (UTC)
- Also, WP:NOTBROKEN. No need for direct link. --Redrose64 🌹 (talk) 19:01, 6 October 2017 (UTC)
Template-protected edit request on 14 December 2017
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The pages listed in this category are templates.
to The pages listed in this category are templates.
Reason: I have a disambiguation page highlighter, and I'm sick of seeing these orange links to Wikipedia:Templates. It's a disambig page, and it helps no one when directly linked. Help:Templates is much better as it is not a disambig page and contains some of the best content on Wikipedia templates. — Mr. Guye (talk) (contribs) 05:14, 14 December 2017 (UTC)
- @Mr. Guye: Done -- John of Reading (talk) 07:04, 14 December 2017 (UTC)
If affirmed/declined to yesno
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I have changed If affirmed and If declined to yesno per Wikipedia:Templates_for_discussion/Log/2019_March_19#Template:If_affirmed. There are some minor changes in what values are accepted, but I've fixed all four transclusions that used these. --Trialpears (talk) 22:11, 25 August 2019 (UTC)
- Done Looks tested to me. Izno (talk) 22:22, 25 August 2019 (UTC)
Automatic topic
[edit]I've written a small module, which is now used by the sandbox (see Special:Diff/975628281/979218167). This new module tries to automatically generate template category topic text based on category's page name, when parameters |topic=
and |description=
are not used. The main idea is that most topical template categories are named Category:<topic> <suffix>
, with very few different suffixes. I've tried it out on several categories. For example, the module can guess a topic for Category:Fungus templates and Category:Ukraine user templates, but can't for Category:India political party templates, because article India political party does not exist.
Theoretically, it will remove a sizeable portion of Category:Template:Template category with no topic or description. Do you think it is a good idea? —andrybak (talk) 14:12, 19 September 2020 (UTC)
- Thanks for the ping, @andrybak. This is an interesting idea.
- I have done a fair bit of work in the last few months on categorising the chronology category header templates, esp since I have built or rebuilt many of them. See Category:chronology category header templates. From what understand, this module wouldn't be much use for them, because most of them are not named "top templates"; they are "topic function templates".
- I haven't done much analysis of what proportion of template categories include a function in their names, but any added value is useful so long as it has a low false positive rate. That's important: no generated text is better than inaccurate generated text. Have you done any evaluation on a random sample to try to identify false positives?
- A few weeks ago, I dis some broader work on templates top get them out of content categories (WT:Categorization#Template_categories_as_subcategories_of_content_categories). I got as as far as about depth 3 or 4, which was enough for my purposes.
- But along the way I noticed several issues:
- vast numbers of template cats which lack {{Template category}}
- vast numbers of cats named "Foo templates" but with {{Template category}} set as type=navbox.
- A systematic cleanup is needed. --BrownHairedGirl (talk) • (contribs) 15:36, 19 September 2020 (UTC)
- BrownHairedGirl, the only false-positives I can think about are coincidences in abbreviations. E.g. Category:Usercat templates doesn't have an article Usercat, but for the deleted category Category:Cathead templates there is an unrelated to category headers article Cathead. Categories near the top of the category graph, like Category:Wikipedia templates, Category:Embeddable templates, or Category:Intricate templates, are also at risk, but most of them have their own
|description=
. —andrybak (talk) 17:24, 19 September 2020 (UTC)- @andrybak: There will also be false positives in undisambiguated titles. --BrownHairedGirl (talk) • (contribs) 22:38, 19 September 2020 (UTC)
- BrownHairedGirl, I've done a lot of location userbox categorization in the past, and I'm can only thing of ambiguities like Category:New York City templates vs Category:New York (state) templates and Category:Georgia (country) templates vs Category:Georgia (U.S. state) templates. Do you happen to know examples in other topic areas? —andrybak (talk) 22:45, 19 September 2020 (UTC)
- @andrybak, on my trawls i saw lots of undismabiguated titles. No, I don't have examples to hand ... but I do urge you to some randomised testing. Location userboxes will expose you to fairly limited subset of template categories.--BrownHairedGirl (talk) • (contribs) 22:51, 19 September 2020 (UTC)
- BrownHairedGirl, oh, I didn't mean to say that I've only dealt with categorization of userboxes. Your message elsewhere spurred me to have a go at removing content categories from templates/template categories per WP:CAT#T and cleaning up Category:Template:Template category with no topic or description. That's where the idea for this automation came from.
- I've checked a hundred random categories from the category Template:Template category with no topic or description. The only disambiguation related thing that came up was different kinds of football, all subcats of which have disambiguated titles already. —andrybak (talk) 23:19, 19 September 2020 (UTC)
- Finally found a false positive: Category:Year of the Pig user templates – incorrect Year of the Pig vs correct Pig (zodiac). —andrybak (talk) 23:46, 19 September 2020 (UTC)
- More false-positives: Category:Search templates, Category:Database templates. —andrybak (talk) 13:27, 20 September 2020 (UTC)
- @andrybak, on my trawls i saw lots of undismabiguated titles. No, I don't have examples to hand ... but I do urge you to some randomised testing. Location userboxes will expose you to fairly limited subset of template categories.--BrownHairedGirl (talk) • (contribs) 22:51, 19 September 2020 (UTC)
- BrownHairedGirl, I've done a lot of location userbox categorization in the past, and I'm can only thing of ambiguities like Category:New York City templates vs Category:New York (state) templates and Category:Georgia (country) templates vs Category:Georgia (U.S. state) templates. Do you happen to know examples in other topic areas? —andrybak (talk) 22:45, 19 September 2020 (UTC)
- @andrybak: There will also be false positives in undisambiguated titles. --BrownHairedGirl (talk) • (contribs) 22:38, 19 September 2020 (UTC)
- BrownHairedGirl, the only false-positives I can think about are coincidences in abbreviations. E.g. Category:Usercat templates doesn't have an article Usercat, but for the deleted category Category:Cathead templates there is an unrelated to category headers article Cathead. Categories near the top of the category graph, like Category:Wikipedia templates, Category:Embeddable templates, or Category:Intricate templates, are also at risk, but most of them have their own
You are invited to join the discussion at Wikipedia talk:WikiProject Templates § Naming of navbox categories. —andrybak (talk) 16:11, 8 November 2020 (UTC)