Template talk:Portal: Difference between revisions
→Edit request {{subst:#time:j F Y}}: new section |
|||
Line 152: | Line 152: | ||
*<code>Pittsburgh city coat of arms.svg</code> → <code>Coat of arms of Pittsburgh, Pennsylvania.svg</code> [[User:Rkt2312|Rkt2312]] ([[User talk:Rkt2312|talk]]) 21:16, 4 September 2023 (UTC) |
*<code>Pittsburgh city coat of arms.svg</code> → <code>Coat of arms of Pittsburgh, Pennsylvania.svg</code> [[User:Rkt2312|Rkt2312]] ([[User talk:Rkt2312|talk]]) 21:16, 4 September 2023 (UTC) |
||
: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 14:16, 5 September 2023 (UTC) |
: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 14:16, 5 September 2023 (UTC) |
||
== Edit request 25 November 2023 == |
|||
{{Edit template-protected|answered=}} |
|||
'''Description of suggested change:''' |
|||
For the [[Portal:Libertarianism|Libertarianism portal]], please replace the coin with the diagram. The use of the coin and gold color on libertarian-related items is leading to POV concerns as seen [https://en.wikipedia.org/w/index.php?title=Portal_talk%3ALibertarianism&diff=1182743306&oldid=1027968567 here] and [https://en.wikipedia.org/w/index.php?title=Template_talk%3ALibertarianism_sidebar&diff=1186695033&oldid=1085869975 here]. |
|||
'''Diff:''' |
|||
{{TextDiff|1= ["libertarianism"] = "2006 AEGold Proof Obv.png|link=|alt=coin",|2= ["libertarianism"] = "Libertarianism-groups-diagram.png|link=|alt=diagram",}} [[User:Wow|Wow]] ([[User talk:Wow|talk]]) 04:02, 25 November 2023 (UTC) |
Revision as of 04:02, 25 November 2023
This is the talk page for discussing improvements to the Portal template. |
|
Archives: Index, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10Auto-archiving period: 180 days |
Template:Portal is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Portals | ||||||||||
|
Purge images from deleted portals?
Have a look at Template:Portal/doc/all. The vast majority of the images here are for non-existent portals. Would there be any objections if I did a mass purge of these? --Trialpears (talk) 03:39, 3 March 2023 (UTC)
Support removal: it would make the Portal module more efficient, with no loss of functionality.— hike395 (talk) 05:41, 3 March 2023 (UTC)- Support but please beware that some redlinks correspond to actual portals, e.g. South africa portal refers to Portal:South Africa. In theory, the best way to do this might be a Lua change to have _displayAll check for portal names in various captialisations, but that would require more than 500 expensive function calls. Could we be more radical and fix the case once in Module:Portal/images/a etc., then have the module lowercase the text if necessary? As an aside, so few portals survived the 2019 cull that we might be able to consolidate them into one module rather than about 26. Certes (talk) 11:12, 3 March 2023 (UTC)
- Whoops, Certes is correct -- we need to clean up Template:Portal/doc/all to show the correct set of portals, otherwise we will be removing images from existing portals. @Trialpears: Can you hold off for a while while we figure out how to clean this up? — hike395 (talk) 12:23, 3 March 2023 (UTC)
- Suggestion --- there may be an easier way to do a one-time cleanup without changing code in Module:Portal. Someone (Trialpears?) could download Wikiget, generate a list of all non-redirect pages in the Portal namespace, then write a little bit of code that filters the lines in all of the Module:Portal/images files, keeping only those that case-insensitively match something in the list.
- I'm very busy IRL, so I wouldn't be able to get to this for a while. But it should be relatively easy to do. As an extra bonus, if we did want to fix TEmplate:Portal/doc/all, we could use this cleanup to put case-sensitive portal names into Module:Portal/images. But the cut-over to that could cause user-visible disruption. — hike395 (talk) 13:12, 3 March 2023 (UTC)
- My plan was to use some regex and {{#ifexist:}} parser functions to remove all the bad rows. It's more complicated though in light of Moxy's comment. --Trialpears (talk) 16:18, 3 March 2023 (UTC)
- Whoops, Certes is correct -- we need to clean up Template:Portal/doc/all to show the correct set of portals, otherwise we will be removing images from existing portals. @Trialpears: Can you hold off for a while while we figure out how to clean this up? — hike395 (talk) 12:23, 3 March 2023 (UTC)
- Opposed Would this blank other templates usage??? If i am correct these images are used for more then just portals like Template:WPbox and Template:WPBannerMeta and Template:WikiProject task force box and Template:Regional notice board box.Moxy- 14:55, 3 March 2023 (UTC)
- Based on this and this search it's used through portal related templates it's only used on a limited amount of portal templates, {{yytab}}, {{yyp}}, {{yywp}}, {{yynb}}, {{User WP/switch}}, {{Regional notice board box/1}}, {{WPbox/1}}, {{WPBannerMeta/templatepage}}, {{WikiProject work group box}}, {{WikiProject task force box}}. That's quite a few templates and straight up removal of all deleted portals isn't an option. I'll have a think about how to handle this. I think I may have some clever ideas to check that it's unused as well, but if that doesn't work I won't do it. --Trialpears (talk) 16:15, 3 March 2023 (UTC)
- I've implemented a tracking category in the sandbox. It's a bit unconventional to not break the image, but it works as can be seen at User:Trialpears/sandbox/1. I plan to implement the category when I have time to monitor it properly. --Trialpears (talk) 12:58, 4 March 2023 (UTC)
- @Trialpears: I don't think the tracking as written in the sandbox will accomplish your goal:
- A large fraction of the deleted portals have been removed from namespace. Those will never get picked up by tracking, because you cannot add categories to template invocations that don't happen. Module:Portal already tracks redlinks invocations (see line 155) in Category:Portal templates with redlinked portals, which is mostly populated
by bugs in templatesless-experienced editors guessing at names of portals. - Conversely, this tracking isn't limited to main space, so it could pick up junk from files list Template:Portal/doc/all, which have links to lower case portals. Per Certes, those are not deleted: they never existed in the first place.
- A large fraction of the deleted portals have been removed from namespace. Those will never get picked up by tracking, because you cannot add categories to template invocations that don't happen. Module:Portal already tracks redlinks invocations (see line 155) in Category:Portal templates with redlinked portals, which is mostly populated
- You're going to need to create the set of (All portal images) \ (Portal images that are used). The only way I know how to do that is externally to Wikipedia, using software. — hike395 (talk) 15:24, 4 March 2023 (UTC)
- @Hike395 I think we're looking for different sets here. The set the tracking category is generating is the set of all pages using a portal image corresponding to a deleted portal. This set is hopefully small enough to fairly manually get the set of all unused portal images corresponding to a deleted portal which is the set that I believe should be removed. --Trialpears (talk) 20:23, 4 March 2023 (UTC)
- @Trialpears: I don't think the tracking as written in the sandbox will accomplish your goal:
- I've implemented a tracking category in the sandbox. It's a bit unconventional to not break the image, but it works as can be seen at User:Trialpears/sandbox/1. I plan to implement the category when I have time to monitor it properly. --Trialpears (talk) 12:58, 4 March 2023 (UTC)
- Based on this and this search it's used through portal related templates it's only used on a limited amount of portal templates, {{yytab}}, {{yyp}}, {{yywp}}, {{yynb}}, {{User WP/switch}}, {{Regional notice board box/1}}, {{WPbox/1}}, {{WPBannerMeta/templatepage}}, {{WikiProject work group box}}, {{WikiProject task force box}}. That's quite a few templates and straight up removal of all deleted portals isn't an option. I'll have a think about how to handle this. I think I may have some clever ideas to check that it's unused as well, but if that doesn't work I won't do it. --Trialpears (talk) 16:15, 3 March 2023 (UTC)
- Support removal. This is a complete joke that most of this template is deleted portals. Gonnym (talk) 16:28, 3 March 2023 (UTC)
- I've made a quick and nasty hack of a report at User:Certes/Reports/Portals. It only shows the first 500 portals. Certes (talk) 18:40, 3 March 2023 (UTC)
Automated filtering
I got a first cut at automated filtering working, by parsing a database dump of all files in the Portal namespace, and using that to filter lines Module:Portal/images/a The output of the filter is Module:Portal/images/a/sandbox. Can editors check to see whether this is correct? — hike395 (talk) 21:45, 4 March 2023 (UTC)
- I ran the automated script and generated all of the Module:Portal/images/*/sandbox files, PTAL. I'm going to look at the existing test cases for anything anomalous. If everything looks ok, I will promote a/sandbox to a and create a new tracking category to check for problems. — hike395 (talk) 22:33, 4 March 2023 (UTC)
- You're only looking in portal space and hence missing a bunch of uses outside that namespace. Take for example the links from Albanian Regional noice board boxes. I'm generally more for finding issues before they come up than fixing afterwards, especially when working with a template used 6 million times. Do you have any issues with my tracking category or could I implement it so we can see how common usage of files associated with deleted portals is? --Trialpears (talk) 01:53, 5 March 2023 (UTC)
- @Trialpears: You can go ahead and implement your tracking category. Both Module:Portal-inline and Module:Portal bar call the image() function in Module:Portal, so please check that Template:Portal-inline/testcases and Template:Portal bar/testcases continue to work.
- Given that line 155 in checkPortals() is called from all three of Module:Portal, Module:Portal-inline, and Module:Portal bar, and given that function suppressed redlinks (line 164) by default in all three modules, I think you're going to find very few deleted Portals via image(), unless they are coming from {{WPbox}} or {{NBbox}} or similar.
- My plan was to try to my filtering on a small fraction of Portals (like those starting with "a", or we can pick an even less common letter). I'm not tracking non-existent portals, I'm tracking the use of failure to find a portal image. When my modified lists go live and if there are a small number of extra failures, I would go and understand and fix them. If there's a large number, I would revert.
- You're right that my filtering was based on a database dump of Portal space. I can also add a list of WikiProjects and Notice Boards to the "allow" list and regenerate the filtered a-z lists, and add lookup failure tracking to the image() function, too.
- But there is some risk that I've screwed up and would have to revert. The downside would be some amount of time where there are extra puzzle piece portal icons when there shouldn't be. I've spot-checked my lists and they seem to be ok. (Although, as you point out, Albania got filtered out, so that's wrong).
- — hike395 (talk) 07:13, 5 March 2023 (UTC)
- Alright, Category:Usage of portal image for non-existent portal is live and working. Looks like we're not missing anything major and if we don't remove countries and a few other random items it will be fine. We will have to wait a while for it to populate completely though. --Trialpears (talk) 14:18, 5 March 2023 (UTC)
- @Trialpears: Your clever hack at line 289 of Module:Portal made me realize a much safer way of filtering the portal images. Instead of removing them of Module:Portal/images/*, we can just add
|category=[[Category:Pages with deprecated portal image]]
to the lines we want to remove. If those show up anywhere in WP, then we remove the category tag from the corresponding line. When that category is empty, it's safe to remove all of the marked lines, with zero user disruption. - To clarify: were you thinking that the entries corresponding to the items in Category:Usage of portal image for non-existent portal should be added to the "allow" list? — hike395 (talk) 18:36, 5 March 2023 (UTC)
- I had the same thought when implementing it, but that sadly won't work because of the border parameter at line 285 would strip it. I was indeed thinking that Category:Usage of portal image for non-existent portal could be used to form an allow list or possibly split those out to form a new WikiProject image list. --Trialpears (talk) 18:43, 5 March 2023 (UTC)
- @Trialpears: Line 285 is overly strict -- it should just be filtering "border", not all other arguments. I can fix to allow categorization of stored images. btw, is your use of
|category=
arbitrary? I don't think the image syntax looks for "category" specifically, this is just an unused parameter? Or is there something magical going on? — hike395 (talk) 15:58, 7 March 2023 (UTC)- Logically that is correct, but I'm worried that this is a scenario where the current behavior is relied upon (relevant xkcd). Ignoring
|category=
only wouldn't risk destroying --Trialpears (talk) 03:21, 8 March 2023 (UTC)- Fair point. I added a parser for "category=" in the sandbox at line 288, tests pass (including new tests at Template:Portal image/testcases, see "xtestx"). PTAL: if it's ok, I can make it go live. — hike395 (talk) 11:36, 8 March 2023 (UTC)
- I've updated Module:Portal/images/*/sandbox to add
|category=[[Category:Pages using deprecated portal images]]
, instead of deleting those lines directly. I added images from Category:Usage of portal image for non-existent portal to the "allow" list. Everything is ready to go live to identify any deprecated images that shouldn't be deprecated. — hike395 (talk) 11:34, 9 March 2023 (UTC)- Sorry, a lot going on and didn't have the time to check it out promptly. Looked fine but complicated. I saw you added and removed it quite quickly. Are you sure it was completly populated when removed? Category:Usage of portal image for non-existent portal took about a day to populate fully. --Trialpears (talk) 07:34, 10 March 2023 (UTC)
- Logically that is correct, but I'm worried that this is a scenario where the current behavior is relied upon (relevant xkcd). Ignoring
- @Trialpears: Line 285 is overly strict -- it should just be filtering "border", not all other arguments. I can fix to allow categorization of stored images. btw, is your use of
- I had the same thought when implementing it, but that sadly won't work because of the border parameter at line 285 would strip it. I was indeed thinking that Category:Usage of portal image for non-existent portal could be used to form an allow list or possibly split those out to form a new WikiProject image list. --Trialpears (talk) 18:43, 5 March 2023 (UTC)
- @Trialpears: Your clever hack at line 289 of Module:Portal made me realize a much safer way of filtering the portal images. Instead of removing them of Module:Portal/images/*, we can just add
- Alright, Category:Usage of portal image for non-existent portal is live and working. Looks like we're not missing anything major and if we don't remove countries and a few other random items it will be fine. We will have to wait a while for it to populate completely though. --Trialpears (talk) 14:18, 5 March 2023 (UTC)
It looked like your tracking category was mostly populated. I used to to expand the allow list, so it's done its job. Even if it missed a few, I'm going through manually and removing the deprecated flag. So if the category wasn't fully populated, it will just cause me a little more work. Now I'm gradually moving the sandboxes to main, searching in pages for an alt flag that contains "category=" in the HTML source to find images to rescue. It's slow, but we'll get there eventually. — hike395 (talk) 09:52, 10 March 2023 (UTC)
Ready for removal
Using the idea from Trialpears, I added Category:Pages using deprecated portal image to images in Module:Portal/image/[a-z] that were unlikely to be used by any template. I then went through and found pages that appeared in that category and undeprecated the corresponding image. I did null edits on pages likely to have portal images (e.g., those in Category:WikiProject userbox galleries and Category:Location userbox galleries). I also waited a couple of weeks for the job queue to clear.
Category:Pages using deprecated portal image is now stable and small: it contains residual pages that have deprecated images. Those pages are either user sandboxes or discussions about this template itself. In the image sandboxes (e.g., Module:Portal/images/a/sandbox) I have prepared versions of the code that have the unused/deprecated images removed. You can inspect the removals by diff (e.g., [1]). If no one finds any problems and if no one objects, I'll start to gradually move these sandbox versions to the live versions over a number of days. In the end, the list of portal image icons will be cleaned up and be about half the size of the existing lists.
Please take a look and let me know! Thanks! — hike395 (talk) 20:59, 16 April 2023 (UTC)
- Status: In progress I've removed deprecated images for j-z and have not yet encountered any problems. — hike395 (talk) 18:39, 29 April 2023 (UTC)
- Status: Done Finished removing deprecated images for a-z — hike395 (talk) 05:25, 5 May 2023 (UTC)
- Thanks for that and for your work on the aliases. For completeness, there are a few redundant images in Module:Portal/images/other, after some but not all of the decade portals were deleted. Certes (talk) 09:30, 5 May 2023 (UTC)
- Done I already checked --- All of the entries in Module:Portal/images/other are used at least once in WP via the _image() function outside of a sandbox, so there was no need to mark them as deprecated or remove them. You can verify by looking at the top of Template:Portal/doc/all and {{User from Åland}}.
- I intend to do some further cleanup on the aliases and duplicate images, but that isn't very urgent. — hike395 (talk) 13:29, 5 May 2023 (UTC)
- Thanks for that and for your work on the aliases. For completeness, there are a few redundant images in Module:Portal/images/other, after some but not all of the decade portals were deleted. Certes (talk) 09:30, 5 May 2023 (UTC)
Template-protected edit request on 28 April 2023
This edit request to Module:Portal/images/o has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Rename:
Flag of Omaha, Nebraska.jpg
→Flag of Omaha, Nebraska.svg
Rkt2312 (talk) 23:22, 28 April 2023 (UTC)
- Question: I just removed unused images from the file, and that flag was removed --- @Rkt2312: do you see File:Flag of Omaha, Nebraska.jpg being used in a Portal box, WikiProject box, or userbox anywhere? — hike395 (talk) 05:39, 29 April 2023 (UTC)
- yes, I looked on wikimedia commons. Rkt2312 (talk) 12:17, 29 April 2023 (UTC)
- File:Flag of Omaha, Nebraska.jpg says it is only used in two places:
- User:Buaidh/sandbox, used in a test userbox that does not need to be supported.
- User:Kyjama, not used in a userbox
- Per above, the row for File:Flag of Omaha, Nebraska.jpg is deprecated and can be safely removed from Module:Portal/images/o. There's no need to re-add it to Module:Portal/images/o or convert it to SVG. — hike395 (talk) 13:52, 29 April 2023 (UTC)
- Thank you very much. Rkt2312 (talk) 18:25, 29 April 2023 (UTC)
- File:Flag of Omaha, Nebraska.jpg says it is only used in two places:
- yes, I looked on wikimedia commons. Rkt2312 (talk) 12:17, 29 April 2023 (UTC)
- Question: I just removed unused images from the file, and that flag was removed --- @Rkt2312: do you see File:Flag of Omaha, Nebraska.jpg being used in a Portal box, WikiProject box, or userbox anywhere? — hike395 (talk) 05:39, 29 April 2023 (UTC)
Template-protected edit request on 10 July 2023
This edit request to Module:Portal/images/a has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change the image for arthropods (line 112), from Cercophonius squama.jpg to Butterfly icon (Noun Project).svg. The former may be a featured picture, but at these resolutions it's an unrecognizable blob. The latter is a clean, recognizable icon.
→
Edward-Woodrow :) [talk] 19:46, 10 July 2023 (UTC)
- Not done for now: please establish a consensus for this alteration before using the
{{Edit template-protected}}
template. The scorpion image looks fine to me. – Jonesey95 (talk) 12:57, 11 July 2023 (UTC) - The suggested butterfly image seems much clearer to me at the low resolution available. Certes (talk) 14:07, 11 July 2023 (UTC)
Conservatism portal change
The image for the Conservatism portal has been changed seemingly without consensus. Under Module:Portal/images/c the accompanying image was changed from File:DodgerBlue flag waving.svg to File:Red flag waving.svg. This seems inappropriate as the red flag is symbolic of socialism not conservatism. Can someone who has editing privileges (I don't) please undo this edit? Kiwichris (talk) 03:32, 4 August 2023 (UTC)
- Reverted. @Buaidh: would you like to discuss why you want to make the change? — hike395 (talk) 04:13, 4 August 2023 (UTC)
- The {{conservatism sidebar}} uses a blue flag. The colour is generally associated with the right wing. The U.S. is exceptional, with the more conservative main party using red and their opposition blue. Certes (talk) 09:10, 4 August 2023 (UTC)
- I concur. Buaidh talk e-mail 20:33, 4 August 2023 (UTC)
Template-protected edit request on 23 August 2023
This edit request to Module:Portal/images/e has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Add the image for Portal:Eurovision Song Contest. This is the main symbol of the contest and logo for the Portal. Ktkvtsh (talk) 09:55, 23 August 2023 (UTC)
- Completed. P.I. Ellsworth , ed. put'er there 02:43, 24 August 2023 (UTC)
Template-protected edit request on 4 September 2023
This edit request to Module:Portal/images/p has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Rename:
Pittsburgh city coat of arms.svg
→Coat of arms of Pittsburgh, Pennsylvania.svg
Rkt2312 (talk) 21:16, 4 September 2023 (UTC)
Edit request 25 November 2023
It is requested that an edit be made to the template-protected template at Template:Portal. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Description of suggested change: For the Libertarianism portal, please replace the coin with the diagram. The use of the coin and gold color on libertarian-related items is leading to POV concerns as seen here and here.
Diff:
− | ["libertarianism"] = | + | ["libertarianism"] = "Libertarianism-groups-diagram.png |