Difference between revisions of "Template talk:Lang"
(Created page with "== Implementing the {{code|non-en}} parameter == I'm currently working on an automatic updater for {{tl|Translation switching}} templates, checking the languages present in al...") |
(→Implementing the {{code|non-en}} parameter) |
||
Line 1: | Line 1: | ||
== Implementing the {{code|non-en}} parameter == | == Implementing the {{code|non-en}} parameter == | ||
I'm currently working on an automatic updater for {{tl|Translation switching}} templates, checking the languages present in all {{tl|lang}} templates. To make this effective, we have to enforce the wiki policy of adding all languages to the {{tl|lang}} template even if the inputs are equal (as a cheap example, {{tlx|lang|en{{=}}Soldier|de{{=}}Soldier|fr{{=}}Soldier}}). Though the new parameter could be useful for those cases as well, it's intended for the more technical uses of {{tl|lang}}, for example as seen on {{tl|Cosmetic Nav}} with {{tlx|Lang|en{{=}}50%|ru{{=}}60%}} or on {{tl|Item infobox}} for {{tlx|lang|ar{{=}}float:left; margin: 0.5em 1 0.5em 0em;}}. It's obvious that adding the other 20/21 languages with the exact same content would result in an unnecessary mess. I'd therefore propose [https://wiki.teamfortress.com/w/index.php?title=User:TidB/Sandbox&curid=324570&diff=2114952&oldid=2114951 implementing a new parameter] that is invoked if the {{code|non-en}} parameter is specified and the language case requested is not specified. '''{ [[User:TidB|TidB]]''' | [[User_talk:TidB|t]] | [[Special:Contributions/TidB|c]] | [[User:TidB/WikiTranslator|wt]]''' }''' 14:54, 12 June 2016 (PDT) | I'm currently working on an automatic updater for {{tl|Translation switching}} templates, checking the languages present in all {{tl|lang}} templates. To make this effective, we have to enforce the wiki policy of adding all languages to the {{tl|lang}} template even if the inputs are equal (as a cheap example, {{tlx|lang|en{{=}}Soldier|de{{=}}Soldier|fr{{=}}Soldier}}). Though the new parameter could be useful for those cases as well, it's intended for the more technical uses of {{tl|lang}}, for example as seen on {{tl|Cosmetic Nav}} with {{tlx|Lang|en{{=}}50%|ru{{=}}60%}} or on {{tl|Item infobox}} for {{tlx|lang|ar{{=}}float:left; margin: 0.5em 1 0.5em 0em;}}. It's obvious that adding the other 20/21 languages with the exact same content would result in an unnecessary mess. I'd therefore propose [https://wiki.teamfortress.com/w/index.php?title=User:TidB/Sandbox&curid=324570&diff=2114952&oldid=2114951 implementing a new parameter] that is invoked if the {{code|non-en}} parameter is specified and the language case requested is not specified. '''{ [[User:TidB|TidB]]''' | [[User_talk:TidB|t]] | [[Special:Contributions/TidB|c]] | [[User:TidB/WikiTranslator|wt]]''' }''' 14:54, 12 June 2016 (PDT) | ||
+ | :For both of those examples ({{tlx|lang|ar{{=}}float:left; margin: 0.5em 1 0.5em 0em;}} and {{tlx|Lang|en{{=}}50%|ru{{=}}60%}}), it's not a case of "all languages are the same except english", it's a case of "all languages are the same except <language that is not english>". Adding {{code|non-en}} doesn't really solve either of these. | ||
+ | :I think this would be better solved by adding a new template identical to {{tl|lang}} for which we '''don't''' expect all languages to be present, and use that template for these cases. Either solution requires updating all such cases anyway, so it sounds like the same amount of work. — [[User:WindPower|<span style="font-weight:bold;">Wind</span>]] 14:03, 19 June 2016 (PDT) |
Revision as of 21:03, 19 June 2016
Implementing the non-en
parameter
I'm currently working on an automatic updater for {{Translation switching}}
templates, checking the languages present in all {{lang}}
templates. To make this effective, we have to enforce the wiki policy of adding all languages to the {{lang}}
template even if the inputs are equal (as a cheap example, {{lang|en=Soldier|de=Soldier|fr=Soldier}}
). Though the new parameter could be useful for those cases as well, it's intended for the more technical uses of {{lang}}
, for example as seen on {{Cosmetic Nav}}
with {{Lang|en=50%|ru=60%}}
or on {{Item infobox}}
for {{lang|ar=float:left; margin: 0.5em 1 0.5em 0em;}}
. It's obvious that adding the other 20/21 languages with the exact same content would result in an unnecessary mess. I'd therefore propose implementing a new parameter that is invoked if the non-en
parameter is specified and the language case requested is not specified. { TidB | t | c | wt } 14:54, 12 June 2016 (PDT)
- For both of those examples (
{{lang|ar=float:left; margin: 0.5em 1 0.5em 0em;}}
and{{Lang|en=50%|ru=60%}}
), it's not a case of "all languages are the same except english", it's a case of "all languages are the same except <language that is not english>". Addingnon-en
doesn't really solve either of these. - I think this would be better solved by adding a new template identical to
{{lang}}
for which we don't expect all languages to be present, and use that template for these cases. Either solution requires updating all such cases anyway, so it sounds like the same amount of work. — Wind 14:03, 19 June 2016 (PDT)