Template talk:Software: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(→Parameter p: Passing 'only' etc. to {{{p}}} instead of {{{type}}}?) |
||
Line 4: | Line 4: | ||
::I thought about this idea too, but there is a problem with it: translations. The standard would be "(also in <game1> and <game2>)" for example, but it would be possible to replace "also" with other text, but writing the same values over and over again is not a good idea. If it were possible to add a set of translations to this template, and if a person wrote "suf=:es", then the text would be in Spanish according to the standard. There is also another problem: adding multiple icons. That is, you can try to add 2 variables, one will be responsible for the text at the beginning, the second for the text after, and in general, you can enter other icons in the text after, and the color will be taken from the main icon, but in other icons you will have to enter the "suf" parameter again and they will not be related to the main icon in any way. But the idea is good and I will try to improve it to avoid all problems. --[[User:Max34|Max34]] ([[User talk:Max34|talk]]) 05:04, 5 April 2022 (UTC) | ::I thought about this idea too, but there is a problem with it: translations. The standard would be "(also in <game1> and <game2>)" for example, but it would be possible to replace "also" with other text, but writing the same values over and over again is not a good idea. If it were possible to add a set of translations to this template, and if a person wrote "suf=:es", then the text would be in Spanish according to the standard. There is also another problem: adding multiple icons. That is, you can try to add 2 variables, one will be responsible for the text at the beginning, the second for the text after, and in general, you can enter other icons in the text after, and the color will be taken from the main icon, but in other icons you will have to enter the "suf" parameter again and they will not be related to the main icon in any way. But the idea is good and I will try to improve it to avoid all problems. --[[User:Max34|Max34]] ([[User talk:Max34|talk]]) 05:04, 5 April 2022 (UTC) | ||
:::Right, I forgot about that. --[[User:Popcorn|Popcorn]] ([[User talk:Popcorn|talk]]) 23:43, 4 April 2022 (PDT) | :::Right, I forgot about that. --[[User:Popcorn|Popcorn]] ([[User talk:Popcorn|talk]]) 23:43, 4 April 2022 (PDT) | ||
::::I just realized that we could allow {{tlc|csgo|p{{=}}only}} by adding <code>only, since, not, removed</code> right above <code>in</code> in the #switch statement so that {{param|p}} can be passed to {{tl2|in text}} instead of {{param|type}}. Roughly speaking, I mean: | |||
<pre style="margin:0 0 0 80px; color:#ddd; background-color:#444; border-color:#666">{{#switch: {{{p|}}} | |||
|... = ... | |||
|only | |||
|since | |||
|not | |||
|removed | |||
|in = ... {{{in text|{{{p}}}}}} ... | |||
}}</pre> | |||
::::Changing that would be nice as it is much more intuitive to write {{tlc|csgo|p{{=}}since}} instead of {{tlc|csgo|p{{=}}in|type{{=}}since}} (by the way, why {{param|p}} and not {{param|1}}?), however, it would mean that all game icon templates would need another edit. Thoughts? --[[User:Popcorn|Popcorn]] ([[User talk:Popcorn|talk]]) 09:51, 18 April 2022 (PDT) | |||
== Generic Doc for game icon templates == | == Generic Doc for game icon templates == |
Revision as of 09:51, 18 April 2022
Parameter p
Before p=4
comes into use, I'd like to suggest to change it such that p=4
delivers the {{game name}}
look with no icon and instead p=5 delivers the {{game color}}
. I'm thinking of sentences that have the game icon at the beginning, like the {{base point}}
templates, for example: " This is a point entity available in Template:Game name". --Popcorn (talk) 09:38, 4 April 2022 (PDT)
- Thanks, good solution! By the way, I just realized, that this template would also have the potential to replace the
{{in}}
templates, for example allow p=only and add the following switch case, however, I'm unsure if all those different but similar expressions (only, since, removed, not, also) would make this template unnecessarily complicated and whether that is useful at all.|only=<span style="background-color:#202020;font-weight:bold;padding:2px;{{border-radius|4px}}"><span title="{{{name}}}" style="color:{{{col|#ADD8E6}}}">(''only'' in [[File:{{{ico}}}|link={{{name}}}{{{suf|}}}|{{{name}}}]])</span></span>
--Popcorn (talk) 20:12, 4 April 2022 (PDT)- I thought about this idea too, but there is a problem with it: translations. The standard would be "(also in <game1> and <game2>)" for example, but it would be possible to replace "also" with other text, but writing the same values over and over again is not a good idea. If it were possible to add a set of translations to this template, and if a person wrote "suf=:es", then the text would be in Spanish according to the standard. There is also another problem: adding multiple icons. That is, you can try to add 2 variables, one will be responsible for the text at the beginning, the second for the text after, and in general, you can enter other icons in the text after, and the color will be taken from the main icon, but in other icons you will have to enter the "suf" parameter again and they will not be related to the main icon in any way. But the idea is good and I will try to improve it to avoid all problems. --Max34 (talk) 05:04, 5 April 2022 (UTC)
{{#switch: {{{p|}}} |... = ... |only |since |not |removed |in = ... {{{in text|{{{p}}}}}} ... }}
Generic Doc for game icon templates
I created a generic doc at {{hl2}} and would spread it in the next days like I did with {{csgo}}. I was thinking whether that documentation should be on the page Template:new icon/doc2 or something, however the examples of the doc would be broken on it. --Popcorn (talk) 23:43, 4 April 2022 (PDT)
- I think it's worth renaming from "Template:Hl2/doc" to "Template:Icons_doc" or something like that. I have almost completed the structure of working with "in" templates, but there are many translations missing because I do not know all languages. Unfortunately, I didn't find a way to write multiple icons so that they are all connected, so I'll just make an additional parameter that will be written after the main icon. --Max34 (talk) 06:52, 5 April 2022 (UTC)
- Well, I don't think Category:Game icons/doc is a good place for a /doc since it itself is a new category that we don't actually need and also we would have to write
:Category
as parameter in every transclusion of{{documentation}}
to not have them added to that new /doc Category. I'd suggest going back to Template:Icon doc or Template:Hl2/doc. It's getting confusing with all the different page names. --Popcorn (talk) 09:11, 5 April 2022 (PDT)- Ok, there is still a problem: It is awful to make changes to icon doc that can't be previewed. That's why I had put it to Template:Hl2/doc in the first place. Idea: Move it back and redirect icon doc to it. This way, any game icon template can use the "clean"
:icon doc
as doc page and there is no <includeonly> madness when editing the generic doc. Problem is, we can no longer move to Template:Hl2/doc because it has a (negligible) history by now, so I'm thinking of performing an improper page movement or finding a way to ask an admin to do that. --Popcorn (talk) 10:58, 6 April 2022 (PDT)- Yes, there are similar things on the site, for example, I wanted to replace one icon with a new one and change .gif to .png, but I could not rename the file page because the new name does not match the file type. And when I tried to load a png, it couldn't load it because the file's page name had the wrong format. In other words, an endless loop. When loading a new texture, you can change the name of the page, but not when you load a new image over an existing one. I understand you, I will return everything to Template:Hl2/doc. If you have any more ideas on how to improve this idea with better icons, then it's better to write about it now, because I plan to remake all icons with a new structure. I can only add that I had one idea about auto-translation: if the page uses the Template:Lang template, then it somehow sends the article suffix to the article and already there, if icon templates are used, they put this suffix in "suf" parameter by default. This way you won't need to write the "suf" parameter all the time in other languages, but I have absolutely no idea how to do it, so it's still an idea for now. --Max34 (talk) 20:15, 6 April 2022 (UTC)
- Ok, there is still a problem: It is awful to make changes to icon doc that can't be previewed. That's why I had put it to Template:Hl2/doc in the first place. Idea: Move it back and redirect icon doc to it. This way, any game icon template can use the "clean"
- Well, I don't think Category:Game icons/doc is a good place for a /doc since it itself is a new category that we don't actually need and also we would have to write