Module talk:zh

→

Wyang (talk) 01:49, 17 April 2013 (UTC)

sort
There doesn't seem to be any error in these revisions, but  still produces 'lao3lao3lao3'. It seems the loop structure in this function is broken. Wyang (talk) 04:04, 19 April 2013 (UTC)

Fixed. Wyang (talk) 12:53, 19 April 2013 (UTC)

Name
Since this module contains code specific to Mandarin, it should be named Module:cmn. Although Module:cmn-common fits better with other modules. 00:24, 20 April 2013 (UTC)

Rename it whatever you want. I will not edit any more on en.wikt if such renaming is conducted. Wyang (talk) 11:34, 20 April 2013 (UTC)
 * Wow... don't you think that is a bit excessive? If you don't want to collaborate with Wiktionary and instead expect Wiktionary to do things your way, why do you think this is a good place for you? 12:35, 20 April 2013 (UTC)


 * It probably isn't now. Unfamiliar and non-contributing editors having an undue level of power in determining the policies, telling others you should do this do that because that is in accordance with my perceptions of this issue, blah blah blah. Bye. Wyang (talk) 05:29, 22 April 2013 (UTC)


 * @Wyang. No need to be oversensitive about zh and cmn issue. It's a long-standing argument with different opinions, the position of Western linguists also differs to some extent from the position in mainland China, overseas Chinese communities and other countries. See Requests_for_moves,_mergers_and_splits. Please say something there. --Anatoli (обсудить/вклад) 23:39, 23 April 2013 (UTC)

apostrophe before vowels on pinyin
Could you add an automatic apostrophe before any vowel (except semi-vowels w, y) if the syllable is not first :) ? E.g. 晚安 (wǎn'ān). --Anatoli (обсудить/вклад) 06:06, 26 March 2014 (UTC)


 * Hi. Done. Wyang (talk) 06:21, 26 March 2014 (UTC)
 * Thank you for the quick fix. You're a good programmer. --Anatoli (обсудить/вклад) 07:07, 26 March 2014 (UTC)

zh-forms gloss for 兀
"duplicate of Big Five A461" doesn't seem like a particularly useful gloss... (it's also a curious one because it seems that U+5140 is A461, and the Unicode duplicate would be U+FA0C) —umbreon 126 18:49, 9 May 2015 (UTC)

zh-l 占星師 not converting into simplified
does not automatically add simplified characters. I suspect it has to do with 占, since and  work, and  and  don't. — Justinrleung (t...)⁄c=› 02:00, 13 November 2015 (UTC)

What does this module do/what's it for?
Would be grateful if pointed to documentation. Thanks Hongthay (talk) 08:00, 4 October 2016 (UTC)
 * This is a general-purpose utilities module for Chinese, providing support for new entry creation, trad <-> simp conversion, zh-l, zh-der, etc. Wyang (talk) 06:03, 5 October 2016 (UTC)
 * I ask because many entries are linked to by Module:zh/data/nan-pron/000 etc where it appears pronunciations are also stored. Brings up the issue of duplication (of data and effort to maintain). Is there a plan to replace/merge? I could imagine that the module intends to provide more of a reference reading whereas the entry could have more variants. Hongthay (talk) 16:13, 5 October 2016 (UTC)
 * Yeah they are there for reference. These nan-pron modules are called by, which will try to detect readings in varieties of Chinese recorded in other dictionaries. All the existing entries should have been updated with these readings before, like in , and the entries which haven't been created will pick up readings from here, if they are created using . Wyang (talk) 06:14, 6 October 2016 (UTC)
 * They're also used as a reference for . —suzukaze (t・c) 06:41, 6 October 2016 (UTC)

Gloss-grabbing
I made some changes to the  function (used by  and ).

It no longer looks in the Etymology section. In, it was grabbing "The loss of the nasal –ŋ coda in the ancient northwestern dialect of Middle Chinese, and" from the Etymology section, thinking this was a gloss.

And now it only grabs definitions from the Translingual and Chinese sections. In, it was grabbing the definition from the Japanese section of , as there is no Chinese section. — Eru·tuon 06:24, 22 January 2018 (UTC)

Optimizing der
I think we need to optimize M.der because 不 is getting Lua errors starting from when it calls. This guy on Stack Overflow recommends against using table.insert and ipairs because of the overhead. I am not comfortable enough with Lua or Chinese to make the change... what do you think? &mdash;Internoob 04:42, 25 October 2018 (UTC)
 * The page was running out of time for script execution. I found that changing the  function to use   greatly speeded it up (by about 6 times!) so the problem should not arise again for a while at least.   is quite slow when used over and over, apparently.... (The server is inconsistent. The page had errors when I first visited it, but when I previewed it, it was fine. But it was still taking about 7 seconds, which isn't great, and now it's down to about 1.) — Eru·tuon 05:35, 25 October 2018 (UTC)

Remove '\n' before '|' in all matched TEMPLATE wikitexts
should work as well as . But the former sometimes does not work because the match pattern has forgot it, as in the "syn_saurus" function. 恨国党非蠢即坏 (talk) 08:28, 29 November 2019 (UTC)
 * The formatting should be without line breaks for consistency in the code. — justin(r)leung { (t...) 06:22, 30 November 2019 (UTC)
 * Other templates like zh-pron and zh-forms support breaking lines. If we talk of "consistency", syn_saurus should also support it. Or else the support of breaking lines just varies arbitrarily between templates, without any documents mentioning this potentially buggy design. 恨国党非蠢即坏 (talk) 07:38, 30 November 2019 (UTC)
 * I also question the necessity of protecting this module. 恨国党非蠢即坏 (talk) 07:38, 30 November 2019 (UTC)
 * is the only one that should have line breaks. and most other templates should not have line breaks. This is the type of consistency about - not across all templates but within each template.  does allow line breaks, but it relies on  to not have line breaks. Same goes with, which relies on  to have line breaks (among other formatting constraints). This module is protected because it is linked to many pages, so any edits to the module may cause major changes. — justin(r)leung { (t...) 19:34, 30 November 2019 (UTC)
 * But the problem is you should not leave a buggy code there only known to you or an exclusive club of elite editors. I have been confused for quite a while before I can locate the cause in this module. A common editor should not be required to do this.
 * Now if you really want to protect mod:zh, may I move the code about thesaurus out of it? Because this part is not that frequently used and thus doesn't need protection. I think the protection should only be applied to those really necessary as this is a wiki site. 恨国党非蠢即坏 (talk) 07:59, 1 December 2019 (UTC)
 * The documentation page on  should be clear on how the formatting should look (although it should be explicit).  do you think we should fix this or leave this as a way to force consistency in formatting? — justin(r)leung { (t...) 08:09, 1 December 2019 (UTC)
 * I prefer having Chinese lists without line breaks because such lists can get very long, and we usually don't sort these lists manually. For Latin script languages, I prefer line breaks for easy addition/removal of entries. In some languages such as Japanese, line breaks are used because other templates may be inserted within another template. KevinUp (talk) 08:28, 1 December 2019 (UTC)
 * I don't understand how "can get very long" becomes a reason for no line breaks. Aren't line breaks mostly used to break long lines to make them easier to read and edit? Also if Chinese "can get very long", why can Latin script languages not? 恨国党非蠢即坏 (talk) 09:10, 1 December 2019 (UTC)
 * One important aspect of wiki editing is to keep things consistent. We've been using single line lists for since the beginning and prior to this no one has complained about it. 水 has up to 1200 compounds and editors who use the mobile interface will find it much more difficult to scroll through such a list if the list is in multiple lines. The reason why Chinese compounds can get very long is because all the Chinese lects (Mandarin, Cantonese, Min Nan, etc) are subsumed under a unified Chinese section, unlike other languages on Wiktionary. If there are some Chinese entries using the single line format and some Chinese entries using the multiple line format it would lead to inconsistent formatting. If other editors agree that a multiple line format is more suitable for Chinese compounds then that format shall be used. KevinUp (talk) 17:36, 1 December 2019 (UTC)
 * "mobile interface" argument:
 * Even if the editors do not need to suffer scrolling through long length, the readers do because there are still line breaks when the template is displayed. No reason to ignore readers while taking care of editors.
 * Locating one term in order to change or remove it in an unshaped cluster of characters is as difficult, if not more, as locating it by scrolling longer.
 * "format inconsistency" argument: book use t:der3.   dictionary use t:der4. The more important of wiki editing is to have enough flexibility to make contents easy to read and edit. 恨国党非蠢即坏 (talk) 04:06, 2 December 2019 (UTC)

Delete glyph origin sections in M.extract_gloss
deletes etymology sections. Can glyph origin sections also be deleted to avoid error in 𧙻? --沈澄心✉ 13:01, 19 March 2022 (UTC)


 * ✅ —Fish bowl (talk) 18:09, 19 March 2022 (UTC)