Template talk:Lang-sh-Latn-Cyrl

(Redirected from Template talk:Lang-sh-Cyrl-Latn/sandbox)
Latest comment: 1 year ago by Joy in topic Protection

documentation

edit

What I write here applies equally to {{Lang-sh-Cyrl-Latn}}, {{Lang-sr-Cyrl-Latn}}, and {{Lang-sr-Latn-Cyrl}}.

The documentation for this template should not be a clone of the {{lang-x2}} template. For the uninitiated editor, seeing the {{lang-x2}} documentation when the editor is looking at the {{Lang-sh-Latn-Cyrl}} template doc is bound to cause unnecessary confusion. This template's documentation should document this template using its parameters and describing its functionality and its error messaging. Note that the error messaging for this template is a bit different from the error messaging emitted by {{lang-sh-Cyrl-Latn}}; see the error tests at Template:Lang-sh-Latn-Cyrl/testcases and Template:Lang-sh-Cyrl-Latn/testcases.

Trappist the monk (talk) 17:59, 22 October 2022 (UTC) 18:51, 22 October 2022 (UTC) add sr templatesReply

Aha, so we shouldn't transclude that /doc but instead link it for reference? Easy enough to do, it's just that it's different from the base use case so I defaulted to that. --Joy [shallot] (talk) 19:08, 22 October 2022 (UTC)Reply
Yes and no. Yes, this template should link to {{lang-x2}} because this template is a wrapper template around {{lang-x2}}. But, no, because this template's documentation, as it stands at this writing, does not document this template using its parameters and describing its functionality and its error messaging. For example, an editor writes this, which causes an error message:
{{lang-sh-Latn-Cyrl|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
Error: {{lang-sh-Cyrl-Latn}}: <text2> is not Latin script (help)
So, the editor clicks on the help link and ends up at the top of that template's documentation. But where is the help? The is some at {{lang-x2}} but that documentation says nothing about what has gone wrong with the broken {{lang-sh-Cyrl-Latn}} template because {{lang-sh-Cyrl-Latn}} uses a subset of the {{lang-x2}} template's available parameters. The above error message is specific to {{lang-sh-Cyrl-Latn}}, and is wholly wrong for {{lang-x2}}.
This template, and the others that I mentioned require proper documentation. Certainly you can edit a copy of the {{lang-x2}} documentation, but the original clone and the current documentation is not adequate.
And despite my oftimes claims to the contrary, there are editors out there who do actually read template documentation.
Trappist the monk (talk) 22:21, 22 October 2022 (UTC)Reply
Agreed, we should explain the implementation to clarify the implications, I'll have a crack at that too. --Joy [shallot] (talk) 08:11, 23 October 2022 (UTC)Reply
If this edit is all that you intended to do as far as documentation, that is wholly inadequate. The documentation does not document these templates using their parameters and describing their functionality and their error messaging. I suggested how you might create adequate documentation: you can edit a copy of the {{lang-x2}} documentation. You should do that. As the creator of these templates, it is incumbent upon you to provide documentation for future editors who aren't privy to the inner workings of your templates. Please do the right thing for them.
Trappist the monk (talk) 14:57, 23 October 2022 (UTC)Reply
Why would we duplicate the entire documentation, and fork the effort in maintaining it? I don't see the point of this, we should point people to click the fine link without needing to read the source, but wholesale duplication seems utterly pointless to me. Let's see if we can find a user who is actually sufficiently confused by this phrasing and needs more help before we assume that they exist... One thing that does stand out as needing to be fixed is the fact that these highly visible templates are protection material, so they should have documentation split off into a subpage that can be edited by anyone. --Joy [shallot] (talk) 16:45, 23 October 2022 (UTC)Reply
This and the other two-script templates do not support:
{{{1}}} as a language tag; {{lang-x2}} does
{{{4}}} for translation text as {{lang-x2}} does; the two-script templates use {{{3}}} for the translation text
|swap=; {{lang-x2}} does
|size=; {{lang-x2}} does
The {{lang-xx-Latn-Cyrl}} templates require {{{1}}} to use Latn script and {{{2}}} to use Cyrl script. The {{lang-xx-Cyrl-Latn}} templates require {{{1}}} to use the Cyrl script and {{{2}}} to use Latn script. That is not (and should not be) explained at {{lang-x2}}.
The documentation at Template:Lang-x2/doc is for {{lang-x2}} and explains the workings and purpose of that template; some of it applies to these templates without modification; some of it does not.
Editor confusion due to inadequate documentation is not something that I am making up; it is a real thing even when a template has the best of documentation. There is no need to find a user who is actually sufficiently confused. We write template documentation for the avoidance of confusion.
Appropriately constructed, a single doc page will support all four of the two-script templates so no forking and no duplication.
Yes, a separate doc page is desirable.
we should point people to click the fine link I don't know what you mean by fine link.
Trappist the monk (talk) 17:27, 23 October 2022 (UTC)Reply
I thought you had criticized my earlier docs as too much of a intricate pseudo code to be readable by laymen, but most of what you described is like that in turn :) Like, of course you can't pass the first parameter into any of these four templates as language code. That is precluded by the fact that their documentation says that they mark text as a specific language, hence, it's not supporting use cases beyond that. If we start spelling out these kinds of basic things with even more verbiage, we run the risk of folks just saying "TLDR!" Anyway, I don't think it's useful to further argue about this on a theoretical basis, let's just spend the time and effort working on improving these docs through normal editorial process. --Joy [shallot] (talk) 17:39, 23 October 2022 (UTC)Reply
What? Where did you get that idea? My criticism was about the blind cloning of the {{lang-x2}} documentation into {{lang-sh-Latn-Cyrl}} and {{lang-sh-Cyrl-Latn}}. I don't think that I have mentioned intricate pseudo code anywhere in this discussion. If I have, show me where.
Trappist the monk (talk) 17:55, 23 October 2022 (UTC)Reply
{{Lang-xx-two-script documentation‎}}. Apparently works for {{lang-sh-Latn-Cyrl}}, {{lang-sh-Cyrl-Latn}}, {{lang-sr-Latn-Cyrl}} and {{lang-sr-Cyrl-Latn}}. Examples needed for {{lang-sr-Latn-Cyrl}} and {{lang-sr-Cyrl-Latn}} which I leave to you. I expect that you can copy the whole of the sh examples and replace the sh text with sr text and be done.
Trappist the monk (talk) 23:19, 23 October 2022 (UTC)Reply
Nice, thanks. I appreciate that a fair amount of effort went into creating the abstraction, and for just 4 use cases to date :) Now, I did notice that the more specific categories are gone. Is it safe to copy the category parameter implementation from the bottom of Template:Lang-x/doc? I'm also not sure if we need a separate category from Category:Lang-x templates. --Joy [shallot] (talk) 07:48, 24 October 2022 (UTC)Reply
Template:lang-sh-Cyrl-Latn/doc, Template:lang-sh-Latn-Cyrl/doc, Template:lang-sr-Cyrl-Latn/doc, and Template:lang-sr-Latn-Cyrl/doc are no longer required. Without objection, I shall delete them.
Trappist the monk (talk) 13:42, 24 October 2022 (UTC)Reply
@Trappist the monk well, no, that's the place we can use to place the more specific categories, and one that isn't liable for template protection. --Joy [shallot] (talk) 14:58, 24 October 2022 (UTC)Reply
Template-specific categories can be, as they already are, in {{lang-xx-two-script documentation}}. Given that {{lang-xx-two-script documentation}} is used on four templates, without good reason (persistent vandalism or what-have-you), {{lang-xx-two-script documentation}} is not likely to be protected. There is no need for these extra, unused, ~/doc pages.
Trappist the monk (talk) 15:07, 24 October 2022 (UTC)Reply
That's the problem I'm telling you - they're not the same for all cases necessarily. The Serbo-Croatian ones might be in one set of categories, the Serbian ones in another. The applications do not necessarily overlap 100%. If you want to distinguish those cases within the same page, that sounds like more complicated syntax that few will understand... --Joy [shallot] (talk) 15:30, 24 October 2022 (UTC)Reply
Did you look? Edit {{lang-xx-two-script documentation}} and scroll to the bottom. The specific categories from this version of Template:Lang-sh-Cyrl-Latn/doc and this version of Template:Lang-sh-Latn-Cyrl/doc are the same. The specific categories from this version of Template:Lang-sr-Latn-Cyrl/doc and this version of Template:Lang-sr-Cyrl-Latn/doc are the same. In {{lang-xx-two-script documentation}}, these two sets of categories are segregated so that the Serbo-Croatian categories apply to the Serbo-Croatian templates and the Serbian categories apply to the Serbian templates.
Go to the current template pages:
Look at the listed categories there. Are they correct?
There is hidden text in {{lang-xx-two-script documentation}} that identifies the two separate language category areas. Anyone wanting to add a new category should be able to place the new category into the proper section without difficulty.
There is no need for these extra, unused, ~/doc pages.
Trappist the monk (talk) 16:06, 24 October 2022 (UTC)Reply
Oh, I see now, you made that change shortly before posting "Template-specific categories can be, as they already are, in {{lang-xx-two-script documentation}}", so that phrase didn't convey to me "I just made it happen" but merely that you were talking about some already existing, common set of categories. --Joy [shallot] (talk) 16:48, 24 October 2022 (UTC)Reply
So I can delete the orphaned ~/doc pages?
Trappist the monk (talk) 17:02, 24 October 2022 (UTC)Reply
Don't see any reason against it --Joy [shallot] (talk) 17:27, 24 October 2022 (UTC)Reply
Done.
Trappist the monk (talk) 17:51, 24 October 2022 (UTC)Reply

Default separator

edit

From personal usage and reading, more articles seem to opt for a slash  /  instead of a comma to separate Latin and Cyrillic in case of Serbo-Croatian. Sometimes it's because a comma is much more likely to be part of the actual text inside lang tags, but the vast majority of articles I've seen to date favor a slash (probably out of preference). An argument in favor of a comma could be the fact it resembles other dual-script lang templates, just without saying "romanized" after it. Not proposing either, just seeking opinions on the default separator. -Vipz (talk) 23:05, 29 October 2022 (UTC)Reply

I did a lot of the conversion so far and didn't change the separator because I didn't want to mix 2 separate migrations. However, a lot of this usage was additions of slash unformatted Cyrillic text, so I don't think it's really a truly informed stylistic choice. We could just as well just choose to remove them. I don't think we convey anything truly informative to a typical English reader by changing the default separator, and in lists of multiple foreign languages this makes it stand out for no reason. --Joy [shallot] (talk) 10:34, 30 October 2022 (UTC)Reply

Protection

edit

@Joy: Does this template (along with {{Lang-sh-Cyrl-Latn}}) really need to be template-protected? With only ~200 transclusions semi-protection should suffice. * Pppery * it has begun... 20:51, 24 December 2022 (UTC)Reply

@Pppery I keep going through invocations of {{lang-sh}} and {{lang-sr}} and converting, because there's a lot of them out there, so I just copied the protection level. Since there's 4 variants for each and sh and sr, the total number will be divided among them and go relatively low per template, but the reason why I felt it was automatically appropriate is because the most common usage pattern is in the lead sections of articles. --Joy [shallot] (talk) 17:31, 25 December 2022 (UTC)Reply