Template talk:Imagelink: Difference between revisions
(Created page with "== Automation == I don't know how well this would work because I don't know how the template is used in the Wiki, but how about automating the third parameter by replacing <co...") |
(response) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Automation == | == Automation == | ||
I don't know how well this would work because I don't know how the template is used in the Wiki, but how about automating the third parameter by replacing <code><nowiki>{{#if: {{{link|}}}| {{{3|{{{2}}}}}}|{{#if: {{{3|}}} | [[{{{2}}}{{!}}{{{3}}}]] | [[{{{2}}}]]}}}}</nowiki></code> with <code><nowiki>{{#if: {{{link|}}}|{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}|[[{{{2}}}{{!}}{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}]]}}</nowiki></code> so that the name written behind the icon ist always in the language the icon is linking to. The idea came up, when I was working on [[fuel/de]] when I saw that many names were not corret, but if they were taken from the translation-template, they could have been correct and that in the whole Wiki. I would be glad to get some response. -- [[User:RobbiRobb|RobbiRobb]] ([[User talk:RobbiRobb|talk]]) 12:27, 23 April 2017 (UTC) | I don't know how well this would work because I don't know how the template is used in the Wiki, but how about automating the third parameter by replacing <code><nowiki>{{#if: {{{link|}}}| {{{3|{{{2}}}}}}|{{#if: {{{3|}}} | [[{{{2}}}{{!}}{{{3}}}]] | [[{{{2}}}]]}}}}</nowiki></code> with <code><nowiki>{{#if: {{{link|}}}|{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}|[[{{{2}}}{{!}}{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}]]}}</nowiki></code> so that the name written behind the icon ist always in the language the icon is linking to. The idea came up, when I was working on [[fuel/de]] when I saw that many names were not corret, but if they were taken from the translation-template, they could have been correct and that in the whole Wiki. I would be glad to get some response. -- [[User:RobbiRobb|RobbiRobb]] ([[User talk:RobbiRobb|talk]]) 12:27, 23 April 2017 (UTC) | ||
: Ah, yes, I see what you mean. Sure, I'll see about fixing this. Thanks for telling me. Edit: I have implemented your fix, and have fixed up [[Fuel/de]]. --([[User:Gangsir|Gangsir]]) ([[User talk:Gangsir|talk]]) - <span style="color:#FF0000">Admin</span> 12:45, 23 April 2017 (UTC) | |||
::Thanks, but you might have to check, where the third parameter is used, it seems to be a necessary parameter, when the language used is not english, which means it is used in many cases. -- [[User:RobbiRobb|RobbiRobb]] ([[User talk:RobbiRobb|talk]]) 16:33, 23 April 2017 (UTC) | |||
:::As you might have seen I edited the template again to reinclude the 3rd parameter. The template still autotranslates but if the 3rd parameter is given it will use that as the caption. --[[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) 18:14, 23 April 2017 (UTC) |
Latest revision as of 18:14, 23 April 2017
Automation
I don't know how well this would work because I don't know how the template is used in the Wiki, but how about automating the third parameter by replacing {{#if: {{{link|}}}| {{{3|{{{2}}}}}}|{{#if: {{{3|}}} | [[{{{2}}}{{!}}{{{3}}}]] | [[{{{2}}}]]}}}}
with {{#if: {{{link|}}}|{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}|[[{{{2}}}{{!}}{{#if:{{#titleparts:{{{2}}}|1|2}}|{{translation/{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|1}}}}|{{{2}}}}}]]}}
so that the name written behind the icon ist always in the language the icon is linking to. The idea came up, when I was working on fuel/de when I saw that many names were not corret, but if they were taken from the translation-template, they could have been correct and that in the whole Wiki. I would be glad to get some response. -- RobbiRobb (talk) 12:27, 23 April 2017 (UTC)
- Ah, yes, I see what you mean. Sure, I'll see about fixing this. Thanks for telling me. Edit: I have implemented your fix, and have fixed up Fuel/de. --(Gangsir) (talk) - Admin 12:45, 23 April 2017 (UTC)