![]() |
Template:Lang-sh is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the
talk page for discussing improvements to the
Lang-sh template. |
|
![]() | This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||
|
This language is written in both Latin and Cyrillic, i.e. there's no specific reason to give prevalence to Cyrillic, and this Wiki is written in Latin. If we have to make a choice with regard to how to gear this template, imo we need to go with that. In fact, lead foreign language names in general should be written with English-speakers in mind: if they can be legitimately written in Latin - that ought to be preferred. -- Director ( talk) 20:03, 7 January 2014 (UTC)
Hello! In the sandbox I've made a version of this template that automatically rewrites cyrillic input as both cyrillic and latin. Testcases show the result. Any opinions regarding implementing this change in production version of template? — Dmitrij D. Czarkoff ( talk• track) 23:57, 15 June 2014 (UTC)
{{
lang-hbs|c=Cyrillic text|l=Latin text}}
with any of |l=
or |c=
sufficient, would you find it appropriate? —
Dmitrij D. Czarkoff (
talk•
track) 19:48, 19 June 2014 (UTC)
What was the reason to move this template from well known SH to HBS? FkpCascais ( talk) 12:12, 16 October 2018 (UTC)
![]() | This
edit request to
Template:Lang-hbs has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Option to use, or version with "abbreviation" parameter for the longer language name, so that template, in this particular case "lang-hbs", with other version such as "lang-sh" (both of which have both -Latin and -Cyrillic script), can give abbreviated "SH:" and/or at least "S-H:", or both, instead only "Serbo-Croatian:" when used under specific circumstance and place, such as in "infobox" for example. ౪ Santa ౪ 99° 12:38, 21 February 2019 (UTC)
[[Serbo-Croatian language|Serbo-Croatian]] should be replaced with [[Serbo-Croatian]]. The article itself is called Serbo-Croatian. Surtsicna ( talk) 18:40, 17 September 2020 (UTC)
This template seems to have a mode where you can have:
rendered as:
This is improper - both alphabets are native and equal in status, and indeed Latin has long been the more common one. How do we remove this implication that Cyrillic is the 'original' that is then 'romanized'? -- Joy [shallot] ( talk) 09:40, 31 July 2021 (UTC)
{{lang-sh-Cyrl|Савез комуниста Југославије (CKJ)}}, {{lang|sh-Latn|Savez komunista Jugoslavije (SKJ)}}
{{
lang-sh}}
more-or-less expects that the Latin alphabet is more common because it renders its first argument in italics (has done since its
creation as {{lang-hbs}}
).{{
lang-sh}}
for text written with Cyrillic script is not correct. Italic rendering can be disabled:
{{lang-sh|Савез комуниста Југославије (CKJ)|italic=no}}
{{{1}}}
(args.text
); if wholly Latin script then it does not render {{{2}}}
(args.translit
). This because it doesn't make sense to romanize Latin-script text.{{lang-??}}
templates; adding special-case code for this one opens the door for special case code for that one and that one and ... No thank you.|cyrl=
and |latn=
to render both scripts with {{lang-sh|<Latin-script text>}}
and {{lang|sh-Cyrl|<Cyrillic-script text>}}
. You can invoke
Module:Unicode_data function is
to make sure that |latn=
has only Latin script and similarly that |cyrl=
is not Latin script:
{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Savez komunista Jugoslavije (SKJ)}}|Latin|not Latin}}
→ Latin{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Савез комуниста Југославије (CKJ)}}|Latin|not Latin}}
→ not Latin|cyrl=
and |latn=
will be treated as non-Latin:
{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Savez комуниста Jugoslavije (CKJ)}}|Latin|not Latin}}
→ not Latin|first=
or some such that takes one of two keywords, cyrl
or latn
, could be used to select which of Cyrillic- or Latin-script text is rendered first.{{{2}}}
. I don't know what that legitimate case might be, and perhaps you don't either, but if or when that legitimate case arises, {{
lang-sh}}
should support {{{2}}}
so that the template remains consistent with all of the other {{lang-??}}
templates.{{lang-sh}}
as you have described. Some of those schemes are legitimate, others are not. You can see some of them in
these search results. This is why I suggested the new template to handle both Latin and Cyrillic when the Latin is not a romanization of the Cyrillic.{{
lang-sr}}
and perhaps others. See
Template talk:Lang-sr § Latin text not "romanisation". The new template might be made to support multiple languages where the Latin-script text is not a romanization. Are there others? Pinging
LeoC12 for comment.|separator=
parameter to specify how the Latin-script text and the Cyrillic-script text are joined in the rendering.I don't mean prevent people from using the whole template, but only the bad invocation form with 2 parameters which doesn't get rendered well.To me that says that you want to prevent the use of
{{{2}}}
in {{
lang-sh}}
. I have never agreed that that is or should be an option. This template should operate in the same way that all other
Module:Lang-based {{lang-??}}
templates operate because there may be cases where {{lang-sh}}
may legitimately use {{{2}}}
. I said before that I don't know what that legitimate case might bebut if that legitimate case exists,
{{lang-sh}}
should support it.{{
lang-x2}}
. In its basic form, it correctly renders both texts:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
,
(default separator), ;
, and /
:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=/}}
'
) or double ("
) quote marks:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=' {{red|or}} '}}
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl}}
[[Serbo-Croatian language|Serbo-Croatian]]: <i lang="sh">Savez komunista Jugoslavije (SKJ)</i>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{
lang}}
and the {{lang-??}}
templates. Most require enumeration but some, like |label=
, |link=
, |cat=
, |nocat=
are not enumerated because they apply to both renderings or only to the first rendering.{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=none}}
<span title="Serbo-Croatian-language text"><i lang="sh">Savez komunista Jugoslavije (SKJ)</i></span>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=[[League of Communists of Yugoslavia]]}}
[[League of Communists of Yugoslavia]]: <i lang="sh">Savez komunista Jugoslavije (SKJ)</i>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|italic1=no|italic2=yes}}
[[Serbo-Croatian language|Serbo-Croatian]]: <span lang="sh" style="font-style: normal;">Savez komunista Jugoslavije (SKJ)</span>, <span title="Serbo-Croatian-language text"><i lang="sh">Савез комуниста Југославије (CKJ)</i></span>
{{
lang-x2}}
what can we do to actually apply this?Umm, use
{{
lang-x2}}
? That is, after all, why I wrote it... If that template is not what you mean, then a more clearly stated question is needed.{{
lang-x2}}
is just a template and you use it like you use any other template; see the template's documentation.How do we make it so that lang-sh uses lang-x2 and that it works?We don't.
{{
lang-x2}}
is a separate template with its own set of parameters; it is not intended nor designed to automagically 'do-what-needs-doing' – templates are never that smart. The example from the very beginning of this discussion:
{{
Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
{{lang-x2}}
:
{{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
thousands upon thousands of instances of decades-long usage? I don't think so. According to this tool there are (as I write this) 983 transclusions of
{{
lang-sh}}
.
This search finds 946 articles (as I write this) that use {{
lang-sh}}
. Getting a bit more creative,
this search finds 118 articles that have some sort of parameter after the first parameter (which may or may not be a positional parameter holding Latin or Cyrillic text). Going at it the other way,
this search finds 757 articles that use {{lang-sh}}
with only one parameter. Wiki-searches are notoriously inaccurate but do well enough as a general indicator of what is out there. Given these results, I would guess that there are maybe 200-ish articles that might need 'fixing'. Though that is just a guess, certainly it is less than thousands upon thousands.
... into a system that editors don't recognize and is way more complex without an apparent justification.Umm, what? We have spent a lot of words here precisely because you think that the 'romanization' functionality in
{{
lang-sh}}
is wrong so clearly you think that a change is justified.way more complex? I don't think so. If you are correct and most two-script uses of
{{lang-sh}}
[are] actually Latin firstthen
|swap=yes
can be omitted so the conversion is to rename {{lang-sh}}
to {{
lang-x2}}
and add the first positional parameter that is the ISO 639-1 language tag:{{Lang-sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
→
{{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
– to rename, simply insert x2|
{{
lang-sh/sandbox}}
does not work because the template in this way cannot accept any user-entered parameters. I like fiddling with templates and may take a look at it this weekend but I don't promise anything. -
Vipz (
talk) 08:20, 20 October 2022 (UTC)
{{
lang-x2}}
so you could have both Latin and Cyrillic texts without the 'romanized' static text. But you seem to resist that for reasons that, to me, imply that you think that our editors aren't smart enough to use the template. I dispute that notion; en.wiki editors are, on the whole, not stupid.{{
lang-sh}}
directly use {{lang-x2}}
because then {{lang-sh}}
would operate differently from all of the other similarly named {{lang-??}}
templates and that would be a source of on-going confusion. Better to have a different template with different functionality that serves a different purpose. This is what {{lang-x2}}
does. Further, simply making {{lang-sh}}
call {{lang-x2}}
will break the 750-ish articles using {{lang-sh}}
templates that have only one positional parameter:
{{Lang-sh|Savez komunista Jugoslavije (SKJ)}}
→
Serbo-Croatian: Savez komunista Jugoslavije (SKJ){{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)}}
→ Error: {{lang-x2}}: missing a required argument (
help){{Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
→
Serbo-Croatian: Савез комуниста Југославије (CKJ),
romanized: Savez komunista Jugoslavije (SKJ){{Lang-x2|sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
→ Error: {{lang-x2}}: <text1> is not Latin script (
help){{
lang-sh}}
templates as I described above. I have added a bit of code to {{lang-sh}}
so that it adds an article to
Category:Articles using Lang-sh with second positional parameter when {{{2|}}}
has a value. Articles in that maintenance category can then be fixed by template renaming or other means as appropriate. The category currently holds 12 articles.{{
lang-sh}}
would be different from the universe of other
Module:Lang-based {{lang-??}}
templates. Intentionally creating a uniquely different member of a series of similarly named templates is a poor user interface design choice; a choice that I oppose. Real life, whatever that may be, has no bearing on a consistent user interface design across the whole series of {{lang-??}}
templates.{{
lang-x2}}
? You don't like the name? Create a redirect and name it anything you like. {{lang-x2}}
is intended to be very generic so that it can be used with any language. A wrapper template (or two) around {{
lang-x2}}
is certainly doable and were you to do that I would not object so long as you don't overwrite {{
lang-sh}}
. You could create two templates: {{
lang-sh-Cyrl-Latn}}
and {{
lang-sh-Latn-Cyrl}}
. These names suggest the rendering order. You would prefill |swap=yes
for the former and {{{1}}}
with the language tag sh
for both. You can enforce named parameters |latn=
and |cyrl=
if you want. If you need help, let me know.{{lang-sh-Cyrl-Latn|Земљорадничка странка|Zemljoradnička stranka}}
[asking] editors, old and new, not to use the main lang template for the language in question. If we are to believe Category:Articles using Lang-sh with second positional parameter, only 26 of 946 articles in mainspace use two-script
{{
lang-sh}}
templates. The other 920 articles that use {{lang-sh}}
with only one script are not the subject of this discussion; for those articles, the main lang template for the language in questionworks fine as it is and needs no work. For the 26,
{{
lang-x2}}
is written, works, and is not as unintuitive as you seem to think – the syntax is (intentionally) very similar to {{
lang|sh|<text>}}
.{{
lang-x2}}
does that at a lower level so the end result is more-or-less the same. Fixing 900+ articles where the result of the fix is more-or-less the same as the unfixed seems rather a waste of time and energy to me.![]() |
Template:Lang-sh is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the
talk page for discussing improvements to the
Lang-sh template. |
|
![]() | This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||
|
This language is written in both Latin and Cyrillic, i.e. there's no specific reason to give prevalence to Cyrillic, and this Wiki is written in Latin. If we have to make a choice with regard to how to gear this template, imo we need to go with that. In fact, lead foreign language names in general should be written with English-speakers in mind: if they can be legitimately written in Latin - that ought to be preferred. -- Director ( talk) 20:03, 7 January 2014 (UTC)
Hello! In the sandbox I've made a version of this template that automatically rewrites cyrillic input as both cyrillic and latin. Testcases show the result. Any opinions regarding implementing this change in production version of template? — Dmitrij D. Czarkoff ( talk• track) 23:57, 15 June 2014 (UTC)
{{
lang-hbs|c=Cyrillic text|l=Latin text}}
with any of |l=
or |c=
sufficient, would you find it appropriate? —
Dmitrij D. Czarkoff (
talk•
track) 19:48, 19 June 2014 (UTC)
What was the reason to move this template from well known SH to HBS? FkpCascais ( talk) 12:12, 16 October 2018 (UTC)
![]() | This
edit request to
Template:Lang-hbs has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Option to use, or version with "abbreviation" parameter for the longer language name, so that template, in this particular case "lang-hbs", with other version such as "lang-sh" (both of which have both -Latin and -Cyrillic script), can give abbreviated "SH:" and/or at least "S-H:", or both, instead only "Serbo-Croatian:" when used under specific circumstance and place, such as in "infobox" for example. ౪ Santa ౪ 99° 12:38, 21 February 2019 (UTC)
[[Serbo-Croatian language|Serbo-Croatian]] should be replaced with [[Serbo-Croatian]]. The article itself is called Serbo-Croatian. Surtsicna ( talk) 18:40, 17 September 2020 (UTC)
This template seems to have a mode where you can have:
rendered as:
This is improper - both alphabets are native and equal in status, and indeed Latin has long been the more common one. How do we remove this implication that Cyrillic is the 'original' that is then 'romanized'? -- Joy [shallot] ( talk) 09:40, 31 July 2021 (UTC)
{{lang-sh-Cyrl|Савез комуниста Југославије (CKJ)}}, {{lang|sh-Latn|Savez komunista Jugoslavije (SKJ)}}
{{
lang-sh}}
more-or-less expects that the Latin alphabet is more common because it renders its first argument in italics (has done since its
creation as {{lang-hbs}}
).{{
lang-sh}}
for text written with Cyrillic script is not correct. Italic rendering can be disabled:
{{lang-sh|Савез комуниста Југославије (CKJ)|italic=no}}
{{{1}}}
(args.text
); if wholly Latin script then it does not render {{{2}}}
(args.translit
). This because it doesn't make sense to romanize Latin-script text.{{lang-??}}
templates; adding special-case code for this one opens the door for special case code for that one and that one and ... No thank you.|cyrl=
and |latn=
to render both scripts with {{lang-sh|<Latin-script text>}}
and {{lang|sh-Cyrl|<Cyrillic-script text>}}
. You can invoke
Module:Unicode_data function is
to make sure that |latn=
has only Latin script and similarly that |cyrl=
is not Latin script:
{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Savez komunista Jugoslavije (SKJ)}}|Latin|not Latin}}
→ Latin{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Савез комуниста Југославије (CKJ)}}|Latin|not Latin}}
→ not Latin|cyrl=
and |latn=
will be treated as non-Latin:
{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Savez комуниста Jugoslavije (CKJ)}}|Latin|not Latin}}
→ not Latin|first=
or some such that takes one of two keywords, cyrl
or latn
, could be used to select which of Cyrillic- or Latin-script text is rendered first.{{{2}}}
. I don't know what that legitimate case might be, and perhaps you don't either, but if or when that legitimate case arises, {{
lang-sh}}
should support {{{2}}}
so that the template remains consistent with all of the other {{lang-??}}
templates.{{lang-sh}}
as you have described. Some of those schemes are legitimate, others are not. You can see some of them in
these search results. This is why I suggested the new template to handle both Latin and Cyrillic when the Latin is not a romanization of the Cyrillic.{{
lang-sr}}
and perhaps others. See
Template talk:Lang-sr § Latin text not "romanisation". The new template might be made to support multiple languages where the Latin-script text is not a romanization. Are there others? Pinging
LeoC12 for comment.|separator=
parameter to specify how the Latin-script text and the Cyrillic-script text are joined in the rendering.I don't mean prevent people from using the whole template, but only the bad invocation form with 2 parameters which doesn't get rendered well.To me that says that you want to prevent the use of
{{{2}}}
in {{
lang-sh}}
. I have never agreed that that is or should be an option. This template should operate in the same way that all other
Module:Lang-based {{lang-??}}
templates operate because there may be cases where {{lang-sh}}
may legitimately use {{{2}}}
. I said before that I don't know what that legitimate case might bebut if that legitimate case exists,
{{lang-sh}}
should support it.{{
lang-x2}}
. In its basic form, it correctly renders both texts:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
,
(default separator), ;
, and /
:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=/}}
'
) or double ("
) quote marks:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=' {{red|or}} '}}
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl}}
[[Serbo-Croatian language|Serbo-Croatian]]: <i lang="sh">Savez komunista Jugoslavije (SKJ)</i>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{
lang}}
and the {{lang-??}}
templates. Most require enumeration but some, like |label=
, |link=
, |cat=
, |nocat=
are not enumerated because they apply to both renderings or only to the first rendering.{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=none}}
<span title="Serbo-Croatian-language text"><i lang="sh">Savez komunista Jugoslavije (SKJ)</i></span>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=[[League of Communists of Yugoslavia]]}}
[[League of Communists of Yugoslavia]]: <i lang="sh">Savez komunista Jugoslavije (SKJ)</i>, <span title="Serbo-Croatian-language text"><span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span></span>
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|italic1=no|italic2=yes}}
[[Serbo-Croatian language|Serbo-Croatian]]: <span lang="sh" style="font-style: normal;">Savez komunista Jugoslavije (SKJ)</span>, <span title="Serbo-Croatian-language text"><i lang="sh">Савез комуниста Југославије (CKJ)</i></span>
{{
lang-x2}}
what can we do to actually apply this?Umm, use
{{
lang-x2}}
? That is, after all, why I wrote it... If that template is not what you mean, then a more clearly stated question is needed.{{
lang-x2}}
is just a template and you use it like you use any other template; see the template's documentation.How do we make it so that lang-sh uses lang-x2 and that it works?We don't.
{{
lang-x2}}
is a separate template with its own set of parameters; it is not intended nor designed to automagically 'do-what-needs-doing' – templates are never that smart. The example from the very beginning of this discussion:
{{
Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
{{lang-x2}}
:
{{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
thousands upon thousands of instances of decades-long usage? I don't think so. According to this tool there are (as I write this) 983 transclusions of
{{
lang-sh}}
.
This search finds 946 articles (as I write this) that use {{
lang-sh}}
. Getting a bit more creative,
this search finds 118 articles that have some sort of parameter after the first parameter (which may or may not be a positional parameter holding Latin or Cyrillic text). Going at it the other way,
this search finds 757 articles that use {{lang-sh}}
with only one parameter. Wiki-searches are notoriously inaccurate but do well enough as a general indicator of what is out there. Given these results, I would guess that there are maybe 200-ish articles that might need 'fixing'. Though that is just a guess, certainly it is less than thousands upon thousands.
... into a system that editors don't recognize and is way more complex without an apparent justification.Umm, what? We have spent a lot of words here precisely because you think that the 'romanization' functionality in
{{
lang-sh}}
is wrong so clearly you think that a change is justified.way more complex? I don't think so. If you are correct and most two-script uses of
{{lang-sh}}
[are] actually Latin firstthen
|swap=yes
can be omitted so the conversion is to rename {{lang-sh}}
to {{
lang-x2}}
and add the first positional parameter that is the ISO 639-1 language tag:{{Lang-sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
→
{{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
– to rename, simply insert x2|
{{
lang-sh/sandbox}}
does not work because the template in this way cannot accept any user-entered parameters. I like fiddling with templates and may take a look at it this weekend but I don't promise anything. -
Vipz (
talk) 08:20, 20 October 2022 (UTC)
{{
lang-x2}}
so you could have both Latin and Cyrillic texts without the 'romanized' static text. But you seem to resist that for reasons that, to me, imply that you think that our editors aren't smart enough to use the template. I dispute that notion; en.wiki editors are, on the whole, not stupid.{{
lang-sh}}
directly use {{lang-x2}}
because then {{lang-sh}}
would operate differently from all of the other similarly named {{lang-??}}
templates and that would be a source of on-going confusion. Better to have a different template with different functionality that serves a different purpose. This is what {{lang-x2}}
does. Further, simply making {{lang-sh}}
call {{lang-x2}}
will break the 750-ish articles using {{lang-sh}}
templates that have only one positional parameter:
{{Lang-sh|Savez komunista Jugoslavije (SKJ)}}
→
Serbo-Croatian: Savez komunista Jugoslavije (SKJ){{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)}}
→ Error: {{lang-x2}}: missing a required argument (
help){{Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
→
Serbo-Croatian: Савез комуниста Југославије (CKJ),
romanized: Savez komunista Jugoslavije (SKJ){{Lang-x2|sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
→ Error: {{lang-x2}}: <text1> is not Latin script (
help){{
lang-sh}}
templates as I described above. I have added a bit of code to {{lang-sh}}
so that it adds an article to
Category:Articles using Lang-sh with second positional parameter when {{{2|}}}
has a value. Articles in that maintenance category can then be fixed by template renaming or other means as appropriate. The category currently holds 12 articles.{{
lang-sh}}
would be different from the universe of other
Module:Lang-based {{lang-??}}
templates. Intentionally creating a uniquely different member of a series of similarly named templates is a poor user interface design choice; a choice that I oppose. Real life, whatever that may be, has no bearing on a consistent user interface design across the whole series of {{lang-??}}
templates.{{
lang-x2}}
? You don't like the name? Create a redirect and name it anything you like. {{lang-x2}}
is intended to be very generic so that it can be used with any language. A wrapper template (or two) around {{
lang-x2}}
is certainly doable and were you to do that I would not object so long as you don't overwrite {{
lang-sh}}
. You could create two templates: {{
lang-sh-Cyrl-Latn}}
and {{
lang-sh-Latn-Cyrl}}
. These names suggest the rendering order. You would prefill |swap=yes
for the former and {{{1}}}
with the language tag sh
for both. You can enforce named parameters |latn=
and |cyrl=
if you want. If you need help, let me know.{{lang-sh-Cyrl-Latn|Земљорадничка странка|Zemljoradnička stranka}}
[asking] editors, old and new, not to use the main lang template for the language in question. If we are to believe Category:Articles using Lang-sh with second positional parameter, only 26 of 946 articles in mainspace use two-script
{{
lang-sh}}
templates. The other 920 articles that use {{lang-sh}}
with only one script are not the subject of this discussion; for those articles, the main lang template for the language in questionworks fine as it is and needs no work. For the 26,
{{
lang-x2}}
is written, works, and is not as unintuitive as you seem to think – the syntax is (intentionally) very similar to {{
lang|sh|<text>}}
.{{
lang-x2}}
does that at a lower level so the end result is more-or-less the same. Fixing 900+ articles where the result of the fix is more-or-less the same as the unfixed seems rather a waste of time and energy to me.