Hans/Hant/Hani scripts

Jump to navigation Jump to search

Hans/Hant/Hani scripts

Hey Codecat. Long time no talk. Based on this vote, we are supposed to be using the script template to categorize traditional and simplified Han scripts. However, when I use the {{literary}} template (which uses the {{script}} template), the category doesn't display correctly. Here is an example: 貶黜. As you can see, the template says Mandarin literary terms in Hant script instead of Mandarin literary terms in Traditional Han script. I added all three script options to the {{script}} template here, but it didn't seem to make any difference? Edit: I see you reverted my changes. :) Any ideas? JamesjiaoTC 02:11, 17 June 2012 (UTC)

JamesjiaoTC02:11, 17 June 2012

I think context label templates use a different way of handling scripts. From what I can see they use the actual name you give them rather than the code. It's a bit strange...

CodeCat11:24, 17 June 2012

If you look at Special:WantedCategories, we need to update our category boilers to handle these cases. Yet another reasons for unifying some category boilers; easier to update them if there are less of them.

Mglovesfun (talk)11:32, 17 June 2012
 

Thanks CodeCat. So if I understand you correctly, I will need to write the script param like this: script=Traditional Han ?

JamesjiaoTC22:15, 17 June 2012

I think so, yes.

CodeCat22:23, 17 June 2012

Is there no way to fix this at all? :(

JamesjiaoTC00:23, 18 June 2012

Heya James --

I just fixed the issue for the 貶黜贬黜 (biǎnchù) page. As I suspected, {{literary}} is one of the {{context}} template family. The {{context}} template group suffers from an acute case of Too-Clever-By-Half. Changing the code on the 貶黜贬黜 (biǎnchù) page from {{literary|lang=cmn|script=Hant}} to {{context|lang=cmn|script=Hant|literary}} fixed the problem.

The core issue is that the context label subtemplates such as {{literary}} invoke some overly complicated and fragile template voodoo to call back to {{context}}, and to pass through any additional template tags included in the same template call. This has proven to be error prone and buggy, not least as the subtemplates must all be maintained individually, so updates to things like scripts or additional {{context}} parameter names may wind up falling through the cracks. There are 67 templates listed in Category:Usage_context_labels, of which probably 60 of them must be kept updated, which just hasn't happened.

I've been categorically going through any instance I find of context label usage and changing the format from {{CONTEXT_LABEL|CONTEXT_LABEL_2|etc.|lang=LANG|script=SCRIPT}} to {{context|lang=LANG|script=SCRIPT|CONTEXT_LABEL|CONTEXT_LABEL_2|etc.}}, as the root {{context}} template is the only one that we can be sure has been kept updated for params and additional unnamed argument pass-throughs.

Cheers,

Eiríkr Útlendi │ Tala við mig16:48, 18 June 2012