Module talk:Lang-zh
Zh-xx consolidation dicussion (copy)
The more I look, the more I feel the mess at Category:Chinese multilingual support templates is out of control. There seems to be a lot of redundancy with all these templates...redundancy in of itself isn't bad, but it causes problems when one template is updated (like I recently did), since there are like a hundred others that need to be updated as well, and it can't necessarily be done with AWB.
So, to that end, I just created User:Rjanag/zh, a template that I believe has the functionality of all of these templates. The only difference is that you have to use named parameters, not numbered...but I think most of these template calls used named parameters anyway (ie, {{zh-cp|c=某|p=something}}
, rather than {{zh-cp|某|something}}
). When making it, I was careful to make sure that I didn't lose any of the functionalities contained in any of the other templates. Ideally, this template could be moved to {{zh}}
and then all articles could just use that one, and display the relevant Chinese and romanizations based on what templates are used (for example, some would use {{zh|c=something|p=something|l=something}}
, while others might use {{zh|s=something|t=something|p=something}}
, the difference being that the second one gives both simplified and traditional). Currently, though, {{zh}} is a redirect to {{zh icon}} and a lot of pages seem to use it; it might be used in other ways, too, because its WhatLinksHere says it's included in some random pages (for instance, Quiznos) but I can't find it in the wikitext, suggesting that it's a transclusion within a transclusion....
Anyway, I'm thinking that if it's possible some day for me to go through and manually replace the {{zh}}s with {{zh icon}}s, then I can move this new template to there and slowly start replacing specific templates (like {{zh-cp}}) with this one, in all the articles where they're used. Do you have any thoughts on this? rʨanaɢ talk/contribs 06:35, 18 September 2009 (UTC)
- Good idea, a lot of work. You might want to put your template in mainspace under "zh-testing" or s.t., redirect a common zh-xx template to it, and wait for the complaints to flood in if you've missed s.t., then try another, etc., until you're confident you've got it right, meanwhile migrating from zh to zh icon with AWB (preparse?). Of course, it might not be possible to rd some of the zh-xx templates until the individual articles have named parameters; that could be done with AWB and regex, though I don't know if I'm up to that kind of complexity in regex--I can't get some things to work that look simple on paper. Anyway, no point in editing the individual articles (except for named parameters) until you've redirected all the templates and they're working well. I wouldn't spend my time on it even then; there are bots that can automate the task. kwami (talk) 07:43, 18 September 2009 (UTC)
- Impressive, having a template where Cantonese is nor forced to Jyutping would be really good! Akerbeltz (talk) 22:47, 18 September 2009 (UTC)
- One comment: first=t puts Tongyong before Hanyu, but since Taiwan's switched to Hanyu, do we want them linked like that? Would it be possible to have a generic n=x, where n is any ordinal, and x is any parameter, and repeatable (1=t, 2=s, 3=p, etc.)? kwami (talk) 06:35, 19 September 2009 (UTC)
- Ah, I didn't think about that. I could just get rid of the Tongyong-before-Hanyu bit...the important thing is allowing trad. to go before simp., but I'm not so concerned about the different Pinyin styles. I also considered adding something like first=j to allow Jyutping to go before Pinyin (for Cantonese-related articles), but then again I'm not sure how widely accepted/used Jyutping is as compared to others.
- As for an n=x setup, it should be possible, it would just require lots of messy code—as you can see with the trad./simp. characters, the only way I really know to do it so far is to repeat the code over and over again in different parts of the template. Another option would be to divide the templates into core and shell templates...ie, put all the messy code for displaying simplified characters (for example) into
{{zh-s}}
(after usurping that...or I could just give it a new name), do that for everything, and then make{{zh}}
itself be nothing more than a shell template that has a big #switch statement deciding which thing to show and when. It sounds like something I can play around with in my userspace for a while...these things always seem to work out better in my head than they do in actual code! - If enough functionality gets added to that, it might even be better to divide this across two templates, the current
{{zh}}
template left more or less as-is to be used in most cases (where people aren't concerned about ordering and the current version is sufficient), and something new, like{{zh-full}}
or something, which would have extended functionality but also more parameters and more complicated syntax. rʨanaɢ talk/contribs 15:12, 19 September 2009 (UTC)
- One comment: first=t puts Tongyong before Hanyu, but since Taiwan's switched to Hanyu, do we want them linked like that? Would it be possible to have a generic n=x, where n is any ordinal, and x is any parameter, and repeatable (1=t, 2=s, 3=p, etc.)? kwami (talk) 06:35, 19 September 2009 (UTC)
The people behind Jyutping are just pushy (off Wiki I mean); it has flaws, especially for an English speaking audience, especially the j for [j] and c for [tʃ] thing. Is it not possible to have the ordering flexible, as in, that if you move one above the other manually, they display that way? I must confess to a high degree of ignorance regarding templates. Akerbeltz (talk) 18:02, 19 September 2009 (UTC)
- I don't foresee too much need for flexibility apart from traditional before simplified. Actually, I'd think we'd want that as the default, with "first=s" as an option. After all, traditional is the international form, with simplified being restricted to mainland China (and maybe Singapore?). kwami (talk) 19:41, 19 September 2009 (UTC)
- Perhaps...although at this point it will be difficult to change. I didn't notice your message before I started replacing, and now I've basically gone through and replaced many of the traditional-first templates with
{{zh | ....... | first=t}}
, and many of the simplified-first with just{{zh}}
(but I haven't done all of them...there are still several thousand more, so rather than trying to do them by hand I'm starting to fiddle with bot stuff). So things that already have first=t won't be changed if I update the template, but things that don't (i.e., any articles about mainland China stuff) will be changed, unless a simple way can be found to go and insert first=s into all of them. rʨanaɢ talk/contribs 00:19, 20 September 2009 (UTC)
- Perhaps...although at this point it will be difficult to change. I didn't notice your message before I started replacing, and now I've basically gone through and replaced many of the traditional-first templates with
- AWB can insert first=s into templates which do not contain first=t, and I assume other bots could easily do the same. It should be ignored unless and until it's defined. kwami (talk) 07:02, 20 September 2009 (UTC)
- It would have to be done by a bot, since there are over 6,000 articles that would need to be edited.
- Also, about the suggetsion above for a template with more flexibility... I threw together a mock-up at User:Rjanag/zh-full (with an example in my sandbox), which gives the user full control (I think) over the order in which they display things. In most cases that much control isn't necessary (and indeed, the vast majority of combinations would be illogical...for instance, you would never put the literal translation or any of the romanizations before the Chinese characters), but after some more tweaks I could probably put it into mainspace in the off-chance that anyone wants more control (over, for example, the order in which various romanizations are displayed in a given article). rʨanaɢ talk/contribs 16:34, 20 September 2009 (UTC)
- AWB can insert first=s into templates which do not contain first=t, and I assume other bots could easily do the same. It should be ignored unless and until it's defined. kwami (talk) 07:02, 20 September 2009 (UTC)
- Well, if it's easy to do and not code intensive, why not. But you might wait until there is an actual demand for a particular option - it might never materialize, or materialize in a way we didn't expect. kwami (talk) 22:37, 20 September 2009 (UTC)
Pinyin italicization
Is there a particular reason for Pinyin to be the only romanization that's italicized? I feel like all of them should either be italicized or not italicized, not a mix of the two. Arsonal (talk) 07:48, 28 September 2009 (UTC)
- I did think about that after I added the pinyin italics, but I'm not totally sure about standards. I agree that it's best to italicize all, but I'm not sure if there are some that aren't usually italicized; I'll leave a quick query at WT:CHINESE and then see. rʨanaɢ talk/contribs 12:05, 28 September 2009 (UTC)
- Please de-italicize the pinyin in this template. It renders the diacritics difficult to read, and we generally don't italicize pinyin at WP. Badagnani (talk) 02:27, 21 October 2009 (UTC)
- I added this to make italicization optional. (The default is now set to no italics; this can be changed if there is a consensus to do so). Italics can now be forced by either adding a
|ital=yes
parameter to the template call, or by just putting '' '' around the pinyin text in the template. rʨanaɢ talk/contribs 02:51, 21 October 2009 (UTC)
- I added this to make italicization optional. (The default is now set to no italics; this can be changed if there is a consensus to do so). Italics can now be forced by either adding a
- Thank you. Badagnani (talk) 02:43, 3 November 2009 (UTC)
- Pinyin should be de-italicized. It is not easily readable when italicized, and WP practice for years has been to not italicize it. Badagnani (talk) 03:39, 19 December 2009 (UTC)
- Yes, you said that before, but recently I checked WP:CHINESE and that page says the opposite. If you wish to contest the guideline please do it there first, and once that guideline is changed this template will be updated to conform to it. rʨanaɢ talk/contribs 04:04, 19 December 2009 (UTC)
- Pinyin is always italicized in academic writing and tone marks are not used unless the character or word is obscure. Additionally, there should not be spaces after each syllable, but after each word. For example, we write pinyin, not pin yin. For my part, I think the double-bracket "zh" template needs to lose simplified/full character options and the pinyin option - it makes it feel like a poorly designed dictionary. Just my two cents. White whirlwind (talk) 06:17, 18 June 2010 (UTC)
- You are saying the template should show neither romanizations nor simplified and traditional (not "full") variants? Why? This would be alienating to non-Chinese-speaking readers. Also, if all it shows is one form of characters and nothing else, there is no point anymore for a template at all. rʨanaɢ (talk) 00:20, 19 June 2010 (UTC)
- Pinyin should be de-italicized. It is not easily readable when italicized, and WP practice for years has been to not italicize it. Badagnani (talk) 03:39, 19 December 2009 (UTC)
Simple use
The basic use like {{zh|厚朴}} doesn't work. Could you fix this? --Apoc2400 (talk) 14:59, 7 November 2009 (UTC)
- Fixed. But it's better to specify what you want using {{zh|c=厚朴}}, {{zh|s=厚朴}}, etc. rʨanaɢ talk/contribs 17:40, 7 November 2009 (UTC)
- Yes, you're right, but sometimes I don't know which it is. It still doesn't seem to work, {{zh|厚朴}}: Chinese: 厚朴. --Apoc2400 (talk) 18:40, 7 November 2009 (UTC)
- Oops! I had fixed the code in my sandbox, and forgot to move the fixed code to the real template. Should be working now. rʨanaɢ talk/contribs 18:43, 7 November 2009 (UTC)
- Thanks. Can you make {{zh|厚朴|foo}} do something resonable too? Either default to pinyin or just output foo with no description before. --Apoc2400 (talk) 18:57, 7 November 2009 (UTC)
- Hm... I think after a point, it gets a bit dangerous to try to guess what users mean when they didn't input the parameter names, so for that reason just ouputting "foo" by itself would be better. But even in that case, I'm not sure if that's the best way to go...if you output "foo", the user might not realize that anything was wrong. If someone uses {{zh|厚朴|foo}} and the second parameter doesn't show up, then at least he'll notice there's a problem and go check the template documentation to see how to fix it, and therefore won't make the same result again. I think this is probably the best option. Besides, forms like {{zh|厚朴|foo}} are not really being used as far as I know; when you see them they're just a result of replacements that happened during the bot run, and they seem to be pretty rare (and I'm figuring that when they do happen, people watching the page will fix them manually). rʨanaɢ talk/contribs 19:20, 7 November 2009 (UTC)
- I saw a case in Gua Sha, that you just fixed. For the trade off, it depends on how important is it to specify what kind of romanization is used. --Apoc2400 (talk) 19:56, 7 November 2009 (UTC)
- Hm... I think after a point, it gets a bit dangerous to try to guess what users mean when they didn't input the parameter names, so for that reason just ouputting "foo" by itself would be better. But even in that case, I'm not sure if that's the best way to go...if you output "foo", the user might not realize that anything was wrong. If someone uses {{zh|厚朴|foo}} and the second parameter doesn't show up, then at least he'll notice there's a problem and go check the template documentation to see how to fix it, and therefore won't make the same result again. I think this is probably the best option. Besides, forms like {{zh|厚朴|foo}} are not really being used as far as I know; when you see them they're just a result of replacements that happened during the bot run, and they seem to be pretty rare (and I'm figuring that when they do happen, people watching the page will fix them manually). rʨanaɢ talk/contribs 19:20, 7 November 2009 (UTC)
- Thanks. Can you make {{zh|厚朴|foo}} do something resonable too? Either default to pinyin or just output foo with no description before. --Apoc2400 (talk) 18:57, 7 November 2009 (UTC)
- Oops! I had fixed the code in my sandbox, and forgot to move the fixed code to the real template. Should be working now. rʨanaɢ talk/contribs 18:43, 7 November 2009 (UTC)
- Yes, you're right, but sometimes I don't know which it is. It still doesn't seem to work, {{zh|厚朴}}: Chinese: 厚朴. --Apoc2400 (talk) 18:40, 7 November 2009 (UTC)
Also, is there a way to mark something as Chinese, without producing the 'Chinese:' text? Like {{nihongo}} does for Japanese? --Apoc2400 (talk) 18:44, 7 November 2009 (UTC)
- For that it's better just to use the
{{lang|zh}}
template, which puts it in Chinese font and stuff. It would look like{{lang|zh|厚朴}}
. For example, see Chinese classifier, which has this template all over the place. rʨanaɢ talk/contribs 18:51, 7 November 2009 (UTC)- Ok, that's kind of complex though. Didn't {{lang-zh}} use to do just that? --Apoc2400 (talk) 18:57, 7 November 2009 (UTC)
- Hm, as far as I can tell that template always did what this one does, which is make "Chinese: ___". I think
{{lang}}
is more versatile. - And actually, lang-zh should have been replaced with the others when ZhBot did his run... I didn't realize that template existed, so I'll go quickly run the bot again. rʨanaɢ talk/contribs 19:00, 7 November 2009 (UTC)
- Ok, I guess I remember wrong. {{lang}} seems fine. I added an other question above. --Apoc2400 (talk) 19:11, 7 November 2009 (UTC)
- Hm, as far as I can tell that template always did what this one does, which is make "Chinese: ___". I think
- Ok, that's kind of complex though. Didn't {{lang-zh}} use to do just that? --Apoc2400 (talk) 18:57, 7 November 2009 (UTC)
Template malfuction on Battle of Triangle Hill
I don't know how the vandals inserted stuffs into the template, but once I remove the template, the vandalism is gone. Jim101 (talk) 00:30, 30 November 2009 (UTC)
VANDALISM: Vampire sightings?
I cannot edit this page, but the current version appears to be vandalized. In addition to the usual text, it includes the following nonsense blurb, whose origin I cannot trace:
- There has only ever been 12 reports of vampire siteings and the picturs and Bite's have been breath takingly scary Creepy. a long time ago in 1945 a woman called Mara valances was drained of her blood Throu to Pin sized hole's in her neck just below her Left cheek. The strange thing doctor's noticed is her hole body was dry, But she continued to breath slowly but strong asif she was in a deep sleep. Doctor's reported this to the police shortly after the attack in south Texas. Is was belived she had found maby proof of Existance of vampier's and she was silenced. Mara Valances story was kept secret so that tourisim didnt Get inturupted.
This is of course a really significant issue since it appears on all pages that use the template, which is pretty much all pages that have to do with anything Chinese. Miranche (talk) 00:32, 30 November 2009 (UTC)
- Some idiot vandalized Template:;...fixed now. Jim101 (talk) 00:41, 30 November 2009 (UTC)
Tonyong Pinyin not displaying correctly
I don't know too much about templates, but for pages that use the "tp=" tag, the Tonyong Pinyin link doesn't show up properly.
Example: Fengshan, Taiwan
-Multivariable (talk) 01:00, 7 December 2009 (UTC)
- Fixed. Thanks for pointing that out. rʨanaɢ talk/contribs 01:09, 7 December 2009 (UTC)
Marking language for pinyin
For the pinyin and other latin scripts, should we mark the language as Chinese? I think this would help screen readers pronounce correctly. Perhaps most easily, wrap them as {{lang|zh-Latn|tiān yuán shù}}. --Apoc2400 (talk) 20:37, 27 December 2009 (UTC)
Line breaks
Something I just noticed at Macau is the first line is broken very unnaturally in between the characters of 澳门. This is browser, settings and window size dependent: I'm using Safari 4, with a relatively narrow window, e.g. 800 - 900 pixels. The whole of "门; Mandarin Pinyin:" is being treated as a unit as far as line breaks are concerned. I can also see it on the template page in the examples if I make the window narrow enough.
The problem seems to be the template is inserting non-breakable spaces, so it doesn't break on the spaces between English words or after the semicolons. The latter in particular is a natural place to break the line, and would deal with the problem above.
So can the non-breaking spaces after the semicolons be changed to normal spaces? If someone more familiar with this can look at it and see if my thinking's right I think this is a relatively straightforward fix.--JohnBlackburnewordsdeeds 20:51, 9 April 2010 (UTC)
- I changed the non-breaking spaces to regular ones. How does Macau look now? rʨanaɢ (talk) 21:20, 9 April 2010 (UTC)
- That's much better, thanks. --JohnBlackburnewordsdeeds 21:23, 9 April 2010 (UTC)
Default order
As User:Kwami had pointed out, it is indeed a problem to display simplified characters first by default. Traditional characters is still the official or common standard in many places. Preference shouldn't be given to any of the two by this template. —Preceding unsigned comment added by 119.237.153.52 (talk) 01:30, 3 May 2010 (UTC)
- It's not a problem; as I have said numerous times, the default is very easily overridden and no one is forced to use any particular order. And your preposterous suggestion of "preference shouldn't be given to any of the two" is impossible—unless you can suggest a way to have neither one appear before the other. rʨanaɢ (talk) 01:32, 3 May 2010 (UTC)
Edit request from Paedia, 29 August 2010
It is requested that an edit be made to the template-protected module at Module:Lang-zh. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the module's sandbox before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Please change all instances of Wade-Giles to Wade–Giles. Cheers, Pædia 11:19, 29 August 2010 (UTC)