Template talk:WikiProject country member top icon
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||
|
"Participant"?
[edit]Should this template be moved to "WikiProject country participant top icon"? – Jonesey95 (talk) 15:44, 24 October 2023 (UTC)
- I have no problem with that. The text of these top icons uses "member" which is why I titled the template as such. Gonnym (talk) 15:52, 24 October 2023 (UTC)
- I get it. We can probably leave it until/unless there is a wider RFC to standardize on "participant" in all such uses. I made some tweaks to the template and the documentation and then implemented it in a couple of places. It seems to work fine. It does not obviate the need for individual WikiProject country top icon templates yet; if we want to to a TFD and replace WikiProject country top icon templates, we will probably need a more concise redirect. The current template name makes sense from a guideline perspective, but it is a lot of typing.
- If we want an all-purpose template, we should consider using a switch statement for custom images instead of the
|image=
parameter that I am using now. Also,|1=
would be useful, even though I'm generally against unnamed parameters. That way, if someone transcluded{{WPcountrytopicon|China}}
, they would get the right thing. – Jonesey95 (talk) 16:00, 24 October 2023 (UTC)- Is there a use-case that you know of where the default country image doesn't work and we need a custom images? Gonnym (talk) 00:45, 25 October 2023 (UTC)
- All three that I edited earlier today: {{WikiProject China topicon}} and {{WikiProject Japan topicon}} and {{WikiProject United States topicon}}. – Jonesey95 (talk) 01:08, 25 October 2023 (UTC)
- So File:Flag of United States.svg should work as it is a redirect. File:China dragon.svg is incorrect and even the WikiProject itself does not use it (as it shouldn't as it isn't the flag). And I'd say even the Japan one should be consistent with the others and use an actual flag and not round circle. At least two of these shouldn't use a custom image. Gonnym (talk) 08:49, 25 October 2023 (UTC)
- I don't like to mess with implied consensus in other people's projects. If you want to be bold, go ahead. As for Japan, the problem is that without a border, the Japanese flag just looks like a small red dot. I didn't investigate a clever workaround, but there probably is one. – Jonesey95 (talk) 16:25, 25 October 2023 (UTC)
- I understand. That said, the better soluton would be to revert your wrapper of the China template. There is no reason that a fake flag should be used instead of the actual country one, especially when the WikiProject itself, which the top icon claims to represent, uses the real flag. Gonnym (talk) 09:21, 26 October 2023 (UTC)
- If you want to remove the custom
|image=
parameter from that one, be my guest. It will use the normal China flag. As I said, I assumed that the project chose that image for a reason. In making gnome edits, I prefer to change appearance as little as possible unless I am enhancing MOS conformance. – Jonesey95 (talk) 14:29, 26 October 2023 (UTC)
- If you want to remove the custom
- I understand. That said, the better soluton would be to revert your wrapper of the China template. There is no reason that a fake flag should be used instead of the actual country one, especially when the WikiProject itself, which the top icon claims to represent, uses the real flag. Gonnym (talk) 09:21, 26 October 2023 (UTC)
- I don't like to mess with implied consensus in other people's projects. If you want to be bold, go ahead. As for Japan, the problem is that without a border, the Japanese flag just looks like a small red dot. I didn't investigate a clever workaround, but there probably is one. – Jonesey95 (talk) 16:25, 25 October 2023 (UTC)
- So File:Flag of United States.svg should work as it is a redirect. File:China dragon.svg is incorrect and even the WikiProject itself does not use it (as it shouldn't as it isn't the flag). And I'd say even the Japan one should be consistent with the others and use an actual flag and not round circle. At least two of these shouldn't use a custom image. Gonnym (talk) 08:49, 25 October 2023 (UTC)
- All three that I edited earlier today: {{WikiProject China topicon}} and {{WikiProject Japan topicon}} and {{WikiProject United States topicon}}. – Jonesey95 (talk) 01:08, 25 October 2023 (UTC)
- Is there a use-case that you know of where the default country image doesn't work and we need a custom images? Gonnym (talk) 00:45, 25 October 2023 (UTC)
Category?
[edit]@Gonnym and Jonesey95: most of the templates using this template also add the user to a category (e.g., see Template:WikiProject United States topicon). could we add this logic here? this would allow {{WikiProject country member top icon|country=United States}}
to be completely equivalent to {{WikiProject United States topicon}}
. Frietjes (talk) 22:38, 31 October 2023 (UTC)
- I've added the code but didn't test it out, so let me know if anything doesn't work as it should. Gonnym (talk) 01:35, 1 November 2023 (UTC)
- looks good, I moved it inside the ifexist check to avoid adding non-existing categories. Frietjes (talk) 20:12, 1 November 2023 (UTC)
The United States
[edit]@Gonnym: it looks like {{WikiProject country member top icon|country=United States}}
works because Commons:File:Flag of United States.svg redirects to Commons:File:Flag of the United States.svg and similar with Commons:File:Flag of Taiwan.svg redirecting to Commons:File:Flag of Republic of China.svg. assuming that file redirects aren't a problem, then there is nothing to do, but otherwise, we could possibly use code similar to {{flagdeco}} to get the file name from the {{country data}}
? but, if the redirects are not a problem, then I wouldn't worry about it. Frietjes (talk) 17:36, 6 November 2023 (UTC)
- Yes, file redirects work so those aren't an issue. Gonnym (talk) 17:42, 6 November 2023 (UTC)
- @Gonnym: sounds good. should we make
{{WikiProject member top icon}}
for non-country projects, or move this to{{WikiProject member top icon}}
and add an alternative to the|country=
for states, etc. thank you. Frietjes (talk) 18:22, 16 November 2023 (UTC)- The only issue I see is that with other projects the image name isn't standard, so for Template:WikiProject Jennifer Lopez top icon it isn't File:Jennifer Lopez.svg (the one used is File:JLO logo.png). That isn't a big issue, but that means that it's not as clean as this one. I've done some sandbox work on the WikiFauna one and that too required a sub-page. See User:Gonnym/sandbox/WikiFauna.
- Another option, maybe if we can add the topic icon image to Wikidata it will make the code cleaner (one less sub-page or manual entering). Currently the Jennifer Lopez project entry (wikidata:Q6493617) does not have a value for that (not sure if there a property that could fit it, didn't check). Gonnym (talk) 18:47, 16 November 2023 (UTC)
- for projects that aren't states or countries, we would require the
|image=
. the main advantage is to automate the addition of the category and the project link. Frietjes (talk) 20:16, 16 November 2023 (UTC)- But it is worth it? Having new editors needing to find out what the image is each time they want to add an icon? Creating the generic one is pretty easy and this can just be a wrapper for it. Gonnym (talk) 22:55, 16 November 2023 (UTC)
- it would be worth it to simplify the category code in Template:WikiProject Pharmacology topicon. for replacing Template:WikiProject Pharmacology topicon with a generic template, you would want the template to automatically select the image. Frietjes (talk) 23:52, 16 November 2023 (UTC)
- Ah, you mean keep the templates but just handle the category code in the base one? Gonnym (talk) 06:43, 17 November 2023 (UTC)
- As I suggested above, we could use a switch statement to specify the image for each project. That way, editors would not have to know what image to select. – Jonesey95 (talk) 16:24, 17 November 2023 (UTC)
- a switch for the non-flag based projects is a good idea, as there are not that many with top icon templates right now. at the very least, we should move this to say
{{WikiProject member top icon}}
and allowing for an alternative parameter for non-country projects. Frietjes (talk) 16:09, 20 November 2023 (UTC)- So we want to create a Template:WikiProject member top icon/image which holds the image data? Gonnym (talk) 10:07, 21 November 2023 (UTC)
- that would work, and have the default be
File:Flag of {{{project}}}.svg
orFile:Flag of {{{1}}}.svg
Frietjes (talk) 17:26, 21 November 2023 (UTC)
- that would work, and have the default be
- So we want to create a Template:WikiProject member top icon/image which holds the image data? Gonnym (talk) 10:07, 21 November 2023 (UTC)
- a switch for the non-flag based projects is a good idea, as there are not that many with top icon templates right now. at the very least, we should move this to say
- As I suggested above, we could use a switch statement to specify the image for each project. That way, editors would not have to know what image to select. – Jonesey95 (talk) 16:24, 17 November 2023 (UTC)
- Ah, you mean keep the templates but just handle the category code in the base one? Gonnym (talk) 06:43, 17 November 2023 (UTC)
- it would be worth it to simplify the category code in Template:WikiProject Pharmacology topicon. for replacing Template:WikiProject Pharmacology topicon with a generic template, you would want the template to automatically select the image. Frietjes (talk) 23:52, 16 November 2023 (UTC)
- But it is worth it? Having new editors needing to find out what the image is each time they want to add an icon? Creating the generic one is pretty easy and this can just be a wrapper for it. Gonnym (talk) 22:55, 16 November 2023 (UTC)
- for projects that aren't states or countries, we would require the
- @Gonnym: sounds good. should we make