Template talk:Xyzy

Adding more languages
How about adding Old Armenian (code ) to this list? Admittedly, the language is not terribly important, but the default font (Sylfaen) and size (too small) of Armenian letters in all versions of Windows is extremely badly chosen, unlike Cyrillic or Georgian, so it is important to have sc=Armn always forced. --Vahagn Petrosyan 06:11, 24 July 2009 (UTC)


 * As noted above, we should consider a few additions but very carefully; the tradeoff is between template code that is parsed millions of time (if one was to re-render the whole database) vs the number of useful cases. Adding another code for a script already in the switch is less expensive that a new script. The other issue is that removing a case would be painful, as there is no automatic way to find the uses. Robert Ullmann 09:49, 24 July 2009 (UTC)


 * It is CRITICAL that this list be revised very carefully; just throwing in a bunch of "reasonable" additions will cause overhead that makes the template a de-optimization. And it is very difficult to remove things. Add to the list below and we will look at the stats and add some presently. Robert Ullmann

So for now, suggested additions:

Others: cu Old Church Slavonic would be a good idea, but has two scripts (Glagolitic and Cyrillic) with probably no useful default. We might decide to default it to Cyrillic and require sc=Glag on the others; this sort of thing (defaulting) has not been considered carefully yet.


 * Note, cu Old Church Slavonic should default to, not . And Glagolitic is used much, much rarer so it would indeed be a good idea to explicitly require sc=Glag everytime needed. --Vahagn Petrosyan 14:05, 5 August 2009 (UTC)

Added above: note that by treating Cyrs as the default (rather than always correct) script for cu, this is modifying the semantics of the template a bit. Probably an okay idea. Robert Ullmann 07:40, 20 August 2009 (UTC)

As Hindi and Urdu are essentially two dialects of one language and while working on one, I frequently edit and make use of the other, I am going to re-add ur=ur-Arab to the template. A month of indecision is quite enough for at least this one edit. — [&#32;R·I·C&#32;] opiaterein — 23:48, 18 September 2009 (UTC) I could take this opportunity to be myself, but I'd rather just leave it to an investigator to see what the hell this strike was for. — [&#32;R·I·C&#32;] opiaterein — 23:50, 18 September 2009 (UTC)

Template:Xyzy
Problematic template. Though very widely used, only used via very heavily used template such as, and. So in actual fact, it could be orphaned very quickly. The problem is, as I understand it, that it slows down the loading of pages too much, and it only contains a handful of languages, because to contain more than that it would make entries so large, you'd be unable to read them. So I spend a lot of time adding sc= parameters to bypass Xyzy, therefore saving space in entries. Mglovesfun (talk) 11:51, 21 December 2010 (UTC)
 * A while ago I proposed moving the script information into the language templates themselves, so that each language could be 'queried' for its script and other related information. That would make this and other templates redundant. —CodeCat 18:09, 21 December 2010 (UTC)
 * It also kills the AutoFormat bot. Just another reason to get rid of it. -- Prince Kassad 16:47, 22 December 2010 (UTC)
 * This sounds like a "Be bold" kind of situation. How about someone who knows how to make a bot just takes 's pile of language-script listings, autocreates things like, , , etc. (with the four letter script code as its content), and fill those not covered by langscript with "None". Then we can deprecate Xyzy and other templates. --Yair rand (talk) 17:15, 29 December 2010 (UTC)
 * I'm totally in favor of something that effectively and efficiently reduces or eliminates the need to specify sc=, but this template....really sucks at it. Kill it with fire. — [&#32;R·I·C&#32;] opiaterein — 17:21, 29 December 2010 (UTC)

Discussion has been moved to WT:GP

Failed. Mglovesfun (talk) 12:01, 24 March 2011 (UTC)


 * So, this needs orphaning and deleting? -- Prince Kassad 14:48, 5 April 2011 (UTC)

Proposed new version.
See Grease pit. A proposed new version would not have a magic list of hard-coded languages, but would instead use and so on. Also, it would offer a sc= parameter, so that other templates can do something like   rather than something like   . —Ruakh TALK 20:38, 24 July 2011 (UTC)
 * It seems that it would turn the template into a generic way to use script templates much in the way that is used for language codes. —CodeCat 21:30, 24 July 2011 (UTC)
 * Doesn't already do this? Could we just redirect Xyzy to that? --Mglovesfun (talk) 21:44, 24 July 2011 (UTC)
 * does only a very small part of what is needed: it doesn't support face= (which is necessary) or sc= (which is desirable IMHO, for the reason I gave above), and only partially supports lang= (whereas full support would be desirable); and it breaks horribly when lang= is not specified (which currently occurs in in all instances of  where neither sc= nor lang= is specified, and who-knows-where else). If we make my proposed change to, then I think we'll be able to redirect  to  without harm; but if we were to redirect  to  right now, without greatly enhancing the latter, then we would cause noticeable breakage in a lot of pages. —Ruakh TALK 23:39, 24 July 2011 (UTC)
 * Actually, correction: does something a bit different. It is equivalent to the new . —Ruakh TALK 15:59, 25 July 2011 (UTC)
 * Something is wrong in Ἀράξης. --Vahag 20:31, 25 July 2011 (UTC)
 * That entry referred to the script-template ("Code for undetermined script"), which didn't exist. I've created that template, but also changed the page not to use it, since we're giving the word in Latin script. Thanks for pointing it out. —Ruakh TALK</i > 22:13, 25 July 2011 (UTC)

Proposal: Remove script template call
I propose that the Xyzy template's code be replaced with the following:

This would remove calls to templates like entirely. Additionally, the Xyzy subtemplate calls, langprefix calls, and does-template-exist calls are all removed.

You can test the code by copying the code to the Xyzy edit box and using the "Preview page with this template" tool. --Yair rand (talk) 18:34, 3 December 2012 (UTC)


 * Not all scripts use bold headwords, though. 18:38, 3 December 2012 (UTC)
 * Those that don't should have font-weight specified in Common.css, not in a exclusive template. --Yair rand (talk) 18:40, 3 December 2012 (UTC)
 * I still don't see much point in this, really. I would prefer it if were eliminated altogether, in favour of my earlier proposal of doing everything through CSS classes and/or language tags. Then we wouldn't even need to call Template:/script at all, which would be faster still.  18:51, 3 December 2012 (UTC)
 * Why do you want to remove does-template-exist? All pages listed in Special:Whatlinkshere/Template:Eror would break horribly. -- Liliana • 18:40, 3 December 2012 (UTC)
 * Then we should fix those, first. 18:51, 3 December 2012 (UTC)
 * Once you've done that, you can just wipe it from Template:Xyzy/script. I bet that by itself would help with performance. -- Liliana • 18:52, 3 December 2012 (UTC)
 * I've fixed what I can, all transclusions except for one are now in discussion pages or user subpages. 19:41, 3 December 2012 (UTC)
 * I tried to make the change but Ruakh reverted me. :/ 16:22, 4 December 2012 (UTC)
 * I guess he hates you too now since he found out we were friends in 2006. -- Liliana • 19:04, 4 December 2012 (UTC)
 * I will not go into that. But I do think it's rather rude that he thinks he can just revert changes that have been discussed and agreed upon. As far as I know, actually failed deletion, so any measures that lead to phasing it out are a good thing.  19:19, 4 December 2012 (UTC)
 * When it comes to widely transcluded templates, I believe in erring on the side of caution: if I make an edit to a widely transcluded template that you think is a mistake, I would appreciate it if you reverted it, at least until it could be sorted out. I'm sorry if you find that rude; if you have any suggestions for how to make it come off less rudely, I'm all ears. :-)  (But, sorry: I didn't realize this had been "discussed and agreed upon". I would have stepped in earlier to express my disagreement. Special:WhatLinksHere/Template:Eror was not a one-off cleanup list; I'm very impressed that you cleaned up all existing cases of it, but new cases flow in on a regular basis.) —Ruakh <i >TALK</i > 20:04, 4 December 2012 (UTC)
 * Usually if someone else makes an edit I assume they know what they are doing. Especially you in particular since you seem to like to reprimand me so often, you must know better than me. I assume that if I revert you, you'll just come down on me so I leave it alone. I figure if it's going to be a battle I'd rather let you win than keep arguing, I've kind of gotten fed up with trying to make a point to you. 20:12, 4 December 2012 (UTC)
 * I do usually know what I'm doing, but I make mistakes, like everyone else. (Unlike you and Liliana, I think I'm generally good about making a proposal and waiting a few days for input before actually implementing it; and I hope that this greatly reduces the number of mistakes I make. But it doesn't eliminate them.)  Re: "I assume that if I revert you, you'll just come down on me": I apologize if I've done that in the past. I will try harder to be more open to correction and discussion in the future.   Re: "Usually if someone else makes an edit I assume they know what they are doing": Don't. People very often edit templates without really knowing what they're doing, without really being sure what their edit might be breaking, etc. If you see a problem, trust yourself. It can always be sorted out in discussion. —Ruakh <i >TALK</i > 20:32, 4 December 2012 (UTC)
 * WT:RFDO. --Yair rand (talk) 19:20, 4 December 2012 (UTC)
 * If it is possible to convert all script templates to consist solely of (e.g.), with all of their script-specific behavior being handled in the site CSS, then — yes, we should do approximately that (though this is not the right place to propose it), and then afterward we should modify  accordingly. If that is not possible, then we can't do this, either. (I say "we should do approximately that" because I think a few tweaks are warranted. Firstly — it should be <tt>  </tt> rather than <tt>  </tt>: no need to generate garbage HTML when the language-code is missing. Or maybe even <tt>  </tt>, so we don't produce e.g. <tt>lang="proto:gem-pro"</tt>. Secondly — if we're defining our script templates in such a way that it's literally impossible for them to distinguish <tt>face=head</tt> from <tt>face=bold</tt>, then we might as well eliminate one or the other. Similarly perhaps with <tt>face=ital</tt> and <tt>face=term</tt>, though with those two there's at least the possibility of distinguishing <tt>i</tt> from e.g. <tt>i.mention-Hebr</tt>. Thirdly — we may want to include some bidi-helping stuff, like adding <tt>&amp;lrm;</tt> before and after.) —Ruakh <i >TALK</i > 18:56, 3 December 2012 (UTC)
 * We would never get proto:gem-pro though, because the code we use is just gem-pro. The proto: is only added when calling, not any other times. 19:41, 3 December 2012 (UTC)
 * Oh, darn it, good point. Ah, well. —Ruakh <i >TALK</i > 20:15, 3 December 2012 (UTC)
 * We don't even have &amp;lrm; now. Does it really add anything helpful? --Yair rand (talk) 15:09, 4 December 2012 (UTC)
 * I think it would be desirable for, but I've never quite had the courage to try to identify and deal with all existing entries that would be affected by it. Currently I add it directly to entries in many cases where I can see that I need it. (Its purpose is: <tt> , </tt> currently puts the fú to the right of the bár, because there are no left-to-right characters between the two stretches of Hebrew, whereas <tt> &amp;lrm;, &amp;lrm; </tt> puts them in correct English order.) —Ruakh <i >TALK</i > 16:25, 4 December 2012 (UTC)

Template:Xyzy
This has been orphaned as well, as the extra logic is no longer needed and it's more straightforward to write the code directly. 19:48, 5 June 2013 (UTC)
 * I believe you. Mglovesfun (talk) 20:00, 5 June 2013 (UTC)
 * So what's the new "correct" code for providing a script? --Yair rand (talk) 21:02, 5 June 2013 (UTC)
 * Templates still use sc= as they always did, and when it's omitted the default script for the language will be used. Nothing has changed there. 21:14, 5 June 2013 (UTC)
 * RFD-failed. —Μετάknowledge discuss/deeds 16:43, 19 July 2013 (UTC)