Template talk:Icon: Difference between revisions
Rchromatic (talk | contribs) (Created page with "How to force it works? {{icon|iron-plate|2|Железная пластина}} It does not open Iron plate/ru after click on the image but it opens image. I...") |
(→Add link to items with placeholder image: Fixed by uploading icons) |
||
(12 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
How to force it works? | How to force it works? | ||
{{icon|iron | {{icon|iron plate|2|[[Iron plate/ru|Железная пластина]]}} | ||
It does not open Iron plate/ru after click on the image but it opens image. | It does not open Iron plate/ru after click on the image but it opens image. | ||
{{icon|iron | ---- | ||
{{icon|iron plate|2|Iron plate/ru}} | |||
It opens proper page but hint is not Russian. | It opens proper page but hint is not Russian. | ||
--[[User:Rchromatic|Rchromatic]] ([[User talk:Rchromatic|talk]]) 09:29, 27 June 2014 (CEST) | --[[User:Rchromatic|Rchromatic]] ([[User talk:Rchromatic|talk]]) 09:29, 27 June 2014 (CEST) | ||
<code><nowiki>{{Icon|iron plate|2|Iron plate/ru{{!}}Железная пластина}}</nowiki></code> ⇒ {{Icon|iron plate|2|Iron plate/ru{{!}}Железная пластина}} | |||
Opens the proper page and the hint is Russian. [[User:Technical 13|Technical 13]] ([[User talk:Technical 13|talk]]) 15:09, 7 June 2017 (UTC) | |||
:{{icon|Iron plate}} creates on non-english pages an icon with titles like "Iron plate/de" or "Iron plate/ru" instead of localized "{{translation/de|Iron plate}}" or "{{translation/ru|Iron plate}}" (ad-hoc translated via <code><nowiki>{{translation/XX|Iron plate}}</nowiki></code>). Wouldn't it be better to use the localized string as tooltip? This is a common scenario on all pages with infoboxes. - Well, after looking at the preview, I see that the russian translation seems to break something in the layout here (unexpected end of HTML "dd" element). Is that the reason why no auto-translation is used for icon tooltips? --[[User:M.C.S.|M.C.S.]] ([[User talk:M.C.S.|talk]]) 22:12, 21 May 2020 (UTC) | |||
::The reason is mostly that it wasn't there before I took over the wiki, and after I took over the wiki there were no requests for it. My concern for adding it now would be that the icon template is already rather expensive and adding the translation would make it even more expensive. Do you think the mouseover text is very important to have translated? -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - <span style="color:#FF0000">Admin</span> 15:54, 22 May 2020 (UTC) | |||
== Text display options == | |||
Please modify the existing code above the <code><nowiki><noinclude>…</noinclude></nowiki></code> section to: | |||
<pre> | |||
<div class="factorio-icon" style="background-color:#{{{color|929292}}};">{{#ifexist: File:{{ConvertName|{{{1}}}}}.png | [[File:{{ConvertName|{{{1}}}}}.png{{!}}32px{{!}}link={{#if: {{{3|}}} |{{{3}}}|{{{1}}}{{If language suffix}}}}]] | [[File:Placeholder icon.png{{!}}link=]] <includeonly><div style="display:none;">[[File:{{{1}}}.png{{!}}32px]]</div></includeonly>}}<div class="{{{icon-text-class|factorio-icon-text}}}">{{{2|}}}</div></div> | |||
</pre> | |||
To allow other text such as level ranges to be entered into the template. eg:<div class="factorio-icon" style="background-color: #929292;">[[File:Mining productivity (research).png|32px]]<div class="navbox-icon-text">12-15</div></div> | |||
Thanks, [[User:Technical 13|Technical 13]] ([[User talk:Technical 13|talk]]) 15:07, 7 June 2017 (UTC) | |||
:The change is a formatting change and has nothing to do with being able to add other text into the template, so I don't quite get your reasoning. In my opinion making the numbers smaller like in your examples is actually worse than the standard formatting because it decreases the readability. Could you please further detail your reasoning? -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - <span style="color:#FF0000">Admin</span> 15:59, 7 June 2017 (UTC) | |||
{{Icon|Mining productivity (research)|12-15}} doesn't fit in the div and looks much worse than the smaller text, in my opinion. [[User:Technical 13|Technical 13]] ([[User talk:Technical 13|talk]]) 16:05, 7 June 2017 (UTC) | |||
== Add link to items with placeholder image == | |||
Currently there is no link if image for item is not uploaded. Even if page for item/research exists, it can't be linked. | |||
{{spoiler|button-text=Replace current text with this:|message=<nowiki><div class="factorio-icon" style="background-color:#{{{color|929292}}};">{{#ifexist: File:{{ConvertName|{{{1}}}}}.png | [[File:{{ConvertName|{{{1}}}}}.png{{!}}32px{{!}}link={{{3|{{{1}}}{{If language suffix}}}}}]] | [[File:Placeholder icon.png{{!}}link={{{3|{{{1}}}{{If language suffix}}}}}]] <includeonly><div style="display:none;">[[File:{{ConvertName|{{{1}}}}}.png{{!}}32px]]</div></includeonly>}}<div class="{{{icon-text-class|factorio-icon-text}}}">{{{2|}}}</div></div><noinclude>{{doc}}</noinclude></nowiki>}} | |||
~~ [[User:Mefisto1029|Mefisto1029]] ([[User talk:Mefisto1029|talk]]) 14:40, 16 October 2024 (UTC) | |||
: Hey, that is intentional to discourage using icons that don't exist. I solved the problem of the broken icons for the upcoming items by uploading those icons. The rest of the icons will be uploaded/updated when the expansion releases.-- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - <span style="color:#FF0000">Admin</span> 14:34, 18 October 2024 (UTC) |
Latest revision as of 14:34, 18 October 2024
How to force it works?
It does not open Iron plate/ru after click on the image but it opens image.
It opens proper page but hint is not Russian. --Rchromatic (talk) 09:29, 27 June 2014 (CEST)
{{Icon|iron plate|2|Iron plate/ru{{!}}Железная пластина}}
⇒
Opens the proper page and the hint is Russian. Technical 13 (talk) 15:09, 7 June 2017 (UTC)
{{translation/XX|Iron plate}}
). Wouldn't it be better to use the localized string as tooltip? This is a common scenario on all pages with infoboxes. - Well, after looking at the preview, I see that the russian translation seems to break something in the layout here (unexpected end of HTML "dd" element). Is that the reason why no auto-translation is used for icon tooltips? --M.C.S. (talk) 22:12, 21 May 2020 (UTC) creates on non-english pages an icon with titles like "Iron plate/de" or "Iron plate/ru" instead of localized "Eisenplatte" or "Железная плита" (ad-hoc translated via
- The reason is mostly that it wasn't there before I took over the wiki, and after I took over the wiki there were no requests for it. My concern for adding it now would be that the icon template is already rather expensive and adding the translation would make it even more expensive. Do you think the mouseover text is very important to have translated? -- Bilka (talk) - Admin 15:54, 22 May 2020 (UTC)
Text display options
Please modify the existing code above the <noinclude>…</noinclude>
section to:
<div class="factorio-icon" style="background-color:#{{{color|929292}}};">{{#ifexist: File:{{ConvertName|{{{1}}}}}.png | [[File:{{ConvertName|{{{1}}}}}.png{{!}}32px{{!}}link={{#if: {{{3|}}} |{{{3}}}|{{{1}}}{{If language suffix}}}}]] | [[File:Placeholder icon.png{{!}}link=]] <includeonly><div style="display:none;">[[File:{{{1}}}.png{{!}}32px]]</div></includeonly>}}<div class="{{{icon-text-class|factorio-icon-text}}}">{{{2|}}}</div></div>
To allow other text such as level ranges to be entered into the template. eg:
Thanks, Technical 13 (talk) 15:07, 7 June 2017 (UTC)
- The change is a formatting change and has nothing to do with being able to add other text into the template, so I don't quite get your reasoning. In my opinion making the numbers smaller like in your examples is actually worse than the standard formatting because it decreases the readability. Could you please further detail your reasoning? -- Bilka (talk) - Admin 15:59, 7 June 2017 (UTC)
doesn't fit in the div and looks much worse than the smaller text, in my opinion. Technical 13 (talk) 16:05, 7 June 2017 (UTC)
Add link to items with placeholder image
Currently there is no link if image for item is not uploaded. Even if page for item/research exists, it can't be linked.
~~ Mefisto1029 (talk) 14:40, 16 October 2024 (UTC)