Jump to content

Template talk:Lang-sh

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Lang-sh/doc)

Show both cyrillic and latin

[edit]

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 (talktrack) 23:57, 15 June 2014 (UTC)[reply]

IMO the bigger problem with Cyrillic is that we're now implicitly italicizing it, which is contrary to MOS:Ety. Maybe the best solution is to implement handling for two parameters, one for Latin, one for Cyrillic. --Joy [shallot] (talk) 09:56, 16 June 2014 (UTC)[reply]
@Joy: I updated module behind my proposal, so now Latin text is italicized while Cyrillic is not. — Dmitrij D. Czarkoff (talktrack) 11:01, 16 June 2014 (UTC)[reply]
I still see Cyrillic rendered in italics in the second test case. --Joy [shallot] (talk) 18:01, 16 June 2014 (UTC)[reply]
@Joy: Each testcase shows three strings: (1) request, (2) rendering with production version and (3) rendering with sandbox version. I see Cyrillic rendered in italics with current template (which does not add Latin text) and in regular with sandbox version (which adds Latin text in italic. Are your observations different? — Dmitrij D. Czarkoff (talktrack) 22:22, 16 June 2014 (UTC)[reply]
Ah, that's all right. But the thing you're missing is that we have combined input in the wild. I added a third test case, have a look. --Joy [shallot] (talk) 00:11, 17 June 2014 (UTC)[reply]
@Joy: Yes, I know. This needs to be cleaned up around the actual introduction of the change. Or, alternatively, transitional version with parameter switching on and off (default: off) charecter translation can be implemented, together with a backlog category, so that dual-alphabet input could be cleaned up over some extended period of time. After backlog category is clean, parameter would be set to default on, and consequently removed after some grace period. — Dmitrij D. Czarkoff (talktrack) 00:27, 17 June 2014 (UTC)[reply]
 Solved in sandbox. I also added custom CSS class "lang-sh-old" to the old syntax, so that it may be easier found on page after modifying user's custom CSS file (example). See test cases. — Dmitrij D. Czarkoff (talktrack) 01:22, 17 June 2014 (UTC)[reply]
That makes it as broken as the current template. Not a terribly high standard, that. :) I do have another, separate concern - this seems to mean that the editor has to know the Cyrillic spelling in order for it to be transliterated automatically into Latin. But what about the converse situation? Ideally, do something like add a second parameter, {{lang-sh|Latin text|Cyrl}}, allowing the editor to choose when to output both scripts without having to actually spell it out in Cyrillic. --Joy [shallot] (talk) 18:01, 19 June 2014 (UTC)[reply]
@Joy: This is temporary version. Once backlog is cleared, the template would be changed to accept only Cyrillic and print erroneous output on "Latin,Cyrillic" input. Reverse translation is impossible due to ambiguity of "lj", "nj" and "dž", which happens when editors don't use Unicode (eg. "nj", "lj" and "dž"). That is: I can easily bring up a module that converts proper Latin Unicode Serbo-Croatian, but only a handful of editors could use them. — Dmitrij D. Czarkoff (talktrack) 18:17, 19 June 2014 (UTC)[reply]
Uh, no, don't do that. Enforcing Cyrillic as the sole input to this kind of a generic template would not only lead to a flurry of redundant edits, but it would present a false impression to editors that this language is primarily written in Cyrillic - which it most certainly is not. You could do that at e.g. {{lang-sh-Cyrl}}, but not here. --Joy [shallot] (talk) 19:18, 19 June 2014 (UTC)[reply]
@Joy: OK, then a question: if I made a module for Unicode Latin to Cyrillic transcription and turn this template into {{lang-hbs|c=Cyrillic text|l=Latin text}} with any of |l= or |c= sufficient, would you find it appropriate? — Dmitrij D. Czarkoff (talktrack) 19:48, 19 June 2014 (UTC)[reply]
Oh, I completely concur with you that nobody uses Unicode characters for the digraphs lj, nj and dž (nor should we try to make them change). I suppose that, by converting lj into Cyrillic l+j instead of Cyrillic lj etc, IOW introducing occasional errors in the Cyrillic, we wouldn't be doing anything horrible, because one could still fix it with the manual override. But at the end of the day, you'd still have to deal with not only this but all the other use cases of the template, such as when we used Cyrillic for the srpskohrvatski variant, and Latin for the hrvatskosrpski variant of a phrase (see the intro at Yugoslav People's Army for an example). So all in all it seems to be a lot of work for a questionable level of benefit. --Joy [shallot] (talk) 20:35, 19 June 2014 (UTC)[reply]

HBS?

[edit]

What was the reason to move this template from well known SH to HBS? FkpCascais (talk) 12:12, 16 October 2018 (UTC)[reply]

This 2013 move was since reverted in 2020. --Joy [shallot] (talk) 14:13, 8 August 2021 (UTC)[reply]
Since "sh" is deprecated, I agree to move it to "hbs". Alexei (talk) 09:22, 8 June 2024 (UTC)[reply]
@ITZQing where is "sh" deprecated? --Joy (talk) 14:56, 8 June 2024 (UTC)[reply]
Oh, I see now, the story is described at Serbo-Croatian#ISO classification. Since this would affect over 800 transclusions, it would make sense to give this coverage at WP:TFD, but I don't know how ugly this would be since this is typically used in a subtle manner in article lead sections. Let's bring it up at Template talk:Lang. --Joy (talk) 15:03, 8 June 2024 (UTC)[reply]

Template-protected edit request on 21 February 2019

[edit]

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)[reply]

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. -- /Alex/21 10:57, 22 February 2019 (UTC)[reply]

Pipe & article name

[edit]

[[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)[reply]

Two parameters and "romanized"

[edit]

This template seems to have a mode where you can have:

{{Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}

rendered as:

Serbo-Croatian: Савез комуниста Југославије (CKJ), romanizedSavez komunista Jugoslavije (SKJ)

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)[reply]

If the two texts are the same, use two templates
{{lang-sh-Cyrl|Савез комуниста Југославије (CKJ)}}, {{lang|sh-Latn|Savez komunista Jugoslavije (SKJ)}}
Serbo-Croatian Cyrillic: Савез комуниста Југославије (CKJ), 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}}).
Trappist the monk (talk) 11:10, 31 July 2021 (UTC)[reply]
Trappist the monk ah, so you're saying this invocation is actually wrong - because MOS:BADITALICS? But how can we prevent people from using it? Even if we swapped the two parameters, the result is bad:
Serbo-Croatian: Savez komunista Jugoslavije (SKJ)
The 2nd parameter doesn't even get rendered. This leads me to believe there's code somewhere underneath {{lang}} that autodetects non-Latin characters in the 1st parameter, and only then prints the 'romanized: ...2...'? How do we then get this template to throw an error if the 2nd positional parameter is used at all? --Joy [shallot] (talk) 11:29, 31 July 2021 (UTC)[reply]
Yes, MOS:BADITALICS because using {{lang-sh}} for text written with Cyrillic script is not correct. Italic rendering can be disabled:
{{lang-sh|Савез комуниста Југославије (CKJ)|italic=no}}
Serbo-Croatian: Савез комуниста Југославије (CKJ)
Why should we prevent editors from using this template? It is perfectly valid for text written with Latin script which you have noted is the more commonly used form. Swapping the two parameter values is nonsensical because, while Cyrillic-script text may be a transliteration of Latin-script text, Cyrillic-script is not a romanization of Latin-script text.
Yes, at line 1162, Module:lang inspects the content of {{{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.
I'm not inclined to change anything. Module:Lang supports some 780-ish {{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.
Trappist the monk (talk) 12:11, 31 July 2021 (UTC)[reply]
One thing that you might do is create a template that takes two arguments |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
mixed scripts in either of |cyrl= and |latn= will be treated as non-Latin:
{{#ifeq:true|{{#invoke:Unicode data|is|Latin|Savez комуниста Jugoslavije (CKJ)}}|Latin|not Latin}} → not Latin
A third parameter |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.
Trappist the monk (talk) 15:01, 31 July 2021 (UTC)[reply]
No, 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.
Can we use this invoke.Unicode data conditional in this template instead, to do something useful? Not as a special case in the lang template itself but simply here, before transcluding that one. --Joy [shallot] (talk) 15:54, 31 July 2021 (UTC)[reply]
I don't think that we should prevent the legitimate use of {{{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.
The problem, as I understand it, is that editors commonly want to place Latin-script text adjacent to the equivalent Cyrillic-script text. To do that, they concoct a variety of schemes that include the misuse of {{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.
This may also be an issue with {{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.
Another parameter to consider for a new template would be some sort of |separator= parameter to specify how the Latin-script text and the Cyrillic-script text are joined in the rendering.
Trappist the monk (talk) 17:19, 31 July 2021 (UTC)[reply]
What do you mean by preventing legitimate use of the 2nd positional parameter in this case? I thought we already concluded from the aforementioned examples that it does not apply here - as it is implemented now. Certainly if the implementation of {{lang}} could be amended to not imply 2nd parameter as transliteration (as in, something foreign), that would be good, but still this particular template would always have to set that option. --Joy [shallot] (talk) 21:16, 31 July 2021 (UTC)[reply]
You wrote: 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 be but if that legitimate case exists, {{lang-sh}} should support it.
Trappist the monk (talk) 23:07, 31 July 2021 (UTC)[reply]
Well, that's the core issue, the way this is implemented, a legitimate use case for "romanized" doesn't exist. If for example we could find some Serbian term from e.g. 1300s that was always written natively in Cyrillic, and Latin was foreign to all of its users, that would be primarily written in Cyrillic and its Latin form would be a romanization that should be marked as such. But the premise precludes this already - no such thing has been the case by definition, because Serbo-Croatian first started to be standardized in the 19th century with an understanding that neither alphabet can be exclusively primary. There is simply no use case for this kind of thinking here. --Joy [shallot] (talk) 09:06, 2 August 2021 (UTC)[reply]
To do what I proposed earlier, in Module:Lang/utilities I have created the core of what might be a new template, perhaps {{lang-x2}}. In its basic form, it correctly renders both texts:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)}}
Serbo-Croatian: Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
to swap the rendered order:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to change the separator (recognizes , (default separator), ;, and /:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=/}}
Serbo-Croatian: Savez komunista Jugoslavije (SKJ)/Савез комуниста Југославије (CKJ)
or, insert a string of text as a separator – string must begin and end with matching single (') or double (") quote marks:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|separator=' {{red|or}} '}}
Serbo-Croatian: Savez komunista Jugoslavije (SKJ) or Савез комуниста Југославије (CKJ)
you can identify the non-Latin script:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl}}
Serbo-Croatian: Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
[[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>
Trappist the monk (talk) 13:53, 3 August 2021 (UTC)[reply]
The core code now supports the standard parameters supported by {{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.
The default label can be hidden:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=none}}
Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
<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>
The default label can be changed to something else:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|script2=Cyrl|label=[[League of Communists of Yugoslavia]]}}
League of Communists of Yugoslavia: Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
[[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>
it is possible to independently fidget with italics:
{{#invoke:Lang/utilities|lang_x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|italic1=no|italic2=yes}}
Serbo-Croatian: Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
[[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>
etc.
I'll create the template soon, probably tomorrow.
Trappist the monk (talk) 21:58, 4 August 2021 (UTC)[reply]
{{lang-x2}}
Trappist the monk (talk) 17:15, 5 August 2021 (UTC)[reply]
So, is it ready to be applied now? --Joy [shallot] (talk) 14:09, 8 August 2021 (UTC)[reply]
@Trappist the monk what can we do to actually apply this? It's still wrong after a long while, feels silly not to use the fix... --Joy [shallot] (talk) 08:16, 19 October 2022 (UTC)[reply]
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.
Trappist the monk (talk) 13:37, 19 October 2022 (UTC)[reply]
@Trappist the monk so like this or is something else needed? Sorry, I haven't investigated this intricate syntax in a while so I don't know what you mean by just "use". --Joy [shallot] (talk) 14:48, 19 October 2022 (UTC)[reply]
Yeah, that didn't work, I did a null edit on an article to see how it is and got a big fat red Script error: No such module "lang-x2". error right in the lead section. Please, can you explain how to make this modification or just do it yourself, so we don't risk further disruption? --Joy [shallot] (talk) 14:50, 19 October 2022 (UTC)[reply]
{{lang-x2}} is just a template and you use it like you use any other template; see the template's documentation.
Trappist the monk (talk) 14:56, 19 October 2022 (UTC)[reply]
@Trappist the monk err, so I think I tried that at the sandbox, but I still don't understand what's going on, because now the test cases are throwing a new error. How do we make it so that lang-sh uses lang-x2 and that it works? --Joy [shallot] (talk) 15:22, 19 October 2022 (UTC)[reply]
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)}}
Serbo-Croatian: Савез комуниста Југославије (CKJ), romanizedSavez komunista Jugoslavije (SKJ)
Convert that to use {{lang-x2}}:
{{Lang-x2|sh|Savez komunista Jugoslavije (SKJ)|Савез комуниста Југославије (CKJ)|swap=yes}}
Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
Trappist the monk (talk) 15:35, 19 October 2022 (UTC)[reply]
Umm, then we have a misunderstanding about the use case here, because I would never assume it would make sense to try to convert thousands upon thousands of instances of decades-long usage, into a system that editors don't recognize and is way more complex without an apparent justification. Why wouldn't we be able to transclude lang-x2 inside lang-sh in a way to prevent all that useless effort? --Joy [shallot] (talk) 16:04, 19 October 2022 (UTC)[reply]
Perhaps there's a misunderstanding about the notion of swapping... examples where we have Cyrillic first are few and far between, most of it is actually Latin first, so I don't think those would be a problem to set aside. --Joy [shallot] (talk) 16:06, 19 October 2022 (UTC)[reply]
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 first then |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|
Serbo-Croatian: Savez komunista Jugoslavije (SKJ), Савез комуниста Југославије (CKJ)
Trappist the monk (talk) 17:23, 19 October 2022 (UTC)[reply]
Thanks for doing those counts, that's good to hear, but I still don't understand why are we talking past each other here. The problem that I described is that the phrase "romanized:" is inappropriate in the case of Serbo-Croatian. It should be simply removed from the output of the template, without having to make any changes to the call sites of the template. What is the problem with just doing that? --Joy [shallot] (talk) 08:11, 20 October 2022 (UTC)[reply]
@Trappist the monk: that's the easiest way to implement this but it's very unintuitive. @Joy: {{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)[reply]
Oh, right, we'd have to relay {{{1}}} etc? --Joy [shallot] (talk) 08:53, 20 October 2022 (UTC)[reply]
Yeah, but named parameters and all their aliases too. I think it would be simpler to just implement the module change directly to lang-sh, without tinkering with transclusions. Vipz (talk) 09:08, 20 October 2022 (UTC)[reply]
I know that the 'romanized' static text is a problem for you. That is why I created {{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.
I resist making {{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)
or when there are two positional parameters but the text order is Cyrillic-first:
{{Lang-sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}Serbo-Croatian: Савез комуниста Југославије (CKJ), romanizedSavez komunista Jugoslavije (SKJ)
{{Lang-x2|sh|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}Error: {{lang-x2}}: <text1> is not Latin script (help)
The best thing to do is to rename the two-script {{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 1 articles.
Trappist the monk (talk) 16:02, 20 October 2022 (UTC)[reply]
Ah, so the argument is that it would be different, now I understand. But isn't that merely a reflection of an already existing peculiar difference from real life? --Joy [shallot] (talk) 16:34, 20 October 2022 (UTC)[reply]
Yes, {{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.
Trappist the monk (talk) 00:30, 21 October 2022 (UTC)[reply]
Since we already improvized separate lang-sh-{Cyrl,Latn}, we could also create a helper template lang-sh-bothscripts or something that would make these 26 invocations less odd to an innocent bystander editor - I don't think "x2" is necessarily good user interface, because they can easily take it to mean two languages, not two scripts, and then in context of Yugoslavia start writing Slovene or Macedonian in there and whatnot. --Joy [shallot] (talk) 07:43, 21 October 2022 (UTC)[reply]
So is that really your issue with {{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.
Trappist the monk (talk) 15:31, 21 October 2022 (UTC)[reply]
Ah, good idea. Thanks. --Joy [shallot] (talk) 16:31, 21 October 2022 (UTC)[reply]
Hmm, it doesn't look like it's working, I tried to create it but when I attempted to use it for {{lang-sh-Cyrl-Latn|Земљорадничка странка|Zemljoradnička stranka}}, the preview window said: Lua error in Module:Lang/utilities at line 25: Tried to read nil global args. --Joy [shallot] (talk) 16:53, 21 October 2022 (UTC)[reply]
Fixed that. That template now gives another error:
{{lang-sh-Cyrl-Latn|Земљорадничка странка|Zemljoradnička stranka}}
Serbo-Croatian: Земљорадничка странка, Zemljoradnička stranka
Trappist the monk (talk) 17:06, 21 October 2022 (UTC)[reply]
Awesome, now it was possible to make it work. Thanks again. --Joy [shallot] (talk) 19:56, 21 October 2022 (UTC)[reply]
@Joy could you link the two new templates to the See also section of the page? Also add the rest of country categories. -Vipz (talk) 14:03, 22 October 2022 (UTC)[reply]
Ah, there we go. --Joy [shallot] (talk) 14:25, 22 October 2022 (UTC)[reply]
In the meantime I realized this documentation was under protection, which isn't necessary, so I moved it out to allow it to be edited separately. --Joy [shallot] (talk) 13:48, 29 October 2022 (UTC)[reply]
That's why I asked you to do it, if I were able I'd do this myself. Thanks! -Vipz (talk) 13:49, 29 October 2022 (UTC)[reply]
No, @Trappist the monk, I don't know how did you get the idea I wanted to imply "editors are stupid". It's unintuitive to ask of editors, old and new, not to use the main lang template for the language in question, myself included. I'd rather "confuse" fewer template editors who'll be looking at the template code than hundreds of regular editors with another lang template that's not in the naming pattern of all other lang templates. Thanks for doing the groundwork, I'll get to this if you don't want to. -Vipz (talk) 22:49, 20 October 2022 (UTC)[reply]
That post was not directed to you. In your only post specifically directed to me (at the time, only one sentence), you said nothing about the 'romanized' static text. I put my reply in the wrong place; mea culpa. I'd move it but I think that doing so now would just make for confusion later.
No one here is [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 question works 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>}}.
Trappist the monk (talk) 00:30, 21 October 2022 (UTC)[reply]
@Trappist the monk Most of these nine hundred articles make use of two lang templates instead, because saying "romanized" is incorrect (e.g. {{lang-sh|Example 1}} / {{lang|sh-Cyrl|Егсампл 2}}). Most of these articles are in fact candidates for two-script lang-sh, not just 26. We'll end up with a basically unused lang-sh, only editors unaware of lang-x2 will continue to use it. -Vipz (talk) 08:14, 21 October 2022 (UTC)[reply]
If editors have used paired templates as your example suggests, is there anything that needs fixing? {{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.
Trappist the monk (talk) 15:31, 21 October 2022 (UTC)[reply]
From what I can see, the result is visually often the same, but there's so many cases where MOS:FOREIGNITALICS was not observed and needed to be fixed that it's worth the effort. --Joy [shallot] (talk) 15:45, 22 October 2022 (UTC)[reply]
I've been going through the list and finding a lot of these examples that confirm what you suspect, but it's far from even a majority AFAICT, simply because most uses of lang-sh are in Latin only. Let's postpone the decision on the fate of the baseline template after the more granular ones are fully deployed, which is when we'll have a better overview of what is needed. --Joy [shallot] (talk) 15:43, 22 October 2022 (UTC)[reply]