Jump to content

Module talk:Lang-zh

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Lang-zh)

Template-protected edit request on 5 April 2024

[edit]

I would like to enable the option "first=poj" analogously to "first=j". The "first=j" option allows Cantonese romanisations to be given before Mandarin romanisations, in articles where Cantonese is more relevant. The proposed "first=poj" option would allow Hokkien romanisation (POJ) to be given first, in articles where Hokkien more relevant, e.g. for Bukit Ho Swee, Hong-Gah Museum, Tamsui District.

I believe this could be achieved by adding the following:

From line 114, after:

	local j1 = false -- whether Cantonese Romanisations go first

insert:

	local poj1 = false -- whether Hokkien Romanisations go first

From line 121, after:

			if (testChar == "j") then
				j1 = true
			 end

insert:

			if (testChar == "poj") then
				poj1 = true
			end

(The variable is named "testChar" but it is defined by the regular expression "%a+", which will match not only a single character but also longer strings.)

(On a separate note, there seems to be a superfluous space before "end" on lines 120 and 123.)

From line 137, after:

	if (j1) then
		orderlist[4] = "j"
		orderlist[5] = "cy"
		orderlist[6] = "sl"
		orderlist[7] = "p"
		orderlist[8] = "tp"
		orderlist[9] = "w"
	end

insert:

	if (poj1) then
		orderlist[4] = "poj"
		orderlist[5] = "p"
		orderlist[6] = "tp"
		orderlist[7] = "w"
		orderlist[8] = "j"
		orderlist[9] = "cy"
		orderlist[10] = "sl"
	end

This puts POJ before the Mandarin and Cantonese romanisations. Freelance Intellectual (talk) 08:49, 5 April 2024 (UTC)[reply]

 Done * Pppery * it has begun... 02:53, 15 April 2024 (UTC)[reply]

Double-quotes around glosses

[edit]

Is there a reason we use double-quotes rather than single-quotes to show the output of |tr=? MOS:SIMPLEGLOSS suggests we should prefer singles. — OwenBlacker (he/him; Talk) 17:37, 18 June 2024 (UTC)[reply]

Because |l= is used for literal translations & glosses, and |tr= is (much more rarely) used for non-literal translations. Remsense 17:39, 18 June 2024 (UTC)[reply]
Aha, that makes sense. So I have probably been misusing |tr= when I should have been using |l=. Thank you! — OwenBlacker (he/him; Talk) 18:03, 18 June 2024 (UTC)[reply]

Commas within literal glosses

[edit]

What should we do if there needs to be a comma within a literal translation? I noticed this on Yi Jian Mei (song), where the quotes should be placed around the whole comma-separated phrase, not individually around each side of the comma. pacificboy (talk) 03:56, 11 July 2024 (UTC)[reply]

My assumption when adding this feature was that if one needed to add a comma, it should probably be treated as a proper translation, not a gloss. It turns out I never use this formatting, so I could very plausibly disable it. Remsense 05:49, 11 July 2024 (UTC)[reply]
Ah, that makes sense! I’ll convert it to a translation. Thanks. pacificboy (talk) 02:45, 12 July 2024 (UTC)[reply]

Template-protected edit request on 17 August 2024

[edit]

I propose the following changes to add Tâi-lô romanization support. Of course, POJ covers 95% of Hokkien/Minnan use cases (hence why I have added the "tailo" IANA subtag) but it could still be useful for Taiwanese-specific pages. Additions and modifications below:

--- Module:Lang-zh
+++ Module:Lang-zh

@@ after line 29 @@ local labels = {
 	["sl"] = "Sidney Lau",
    ["poj"] = "Pe̍h-ōe-jī",
+	["tl"] = "Tâi-lô",
	["zhu"] = "Zhuyin Fuhao",
	["l"] = "lit.",
    
@@ after line 46 @@ local wlinks  = {
 	["poj"] = "Pe̍h-ōe-jī",
+	["tl"] = "Tâi-uân Lô-má-jī Phing-im Hong-àn",
    
@@ after line 63 @@ local ISOlang = {
 	["poj"] = "nan-Latn",
+	["tl"] = "nan-Latn-tailo",

@@ after line 74 @@ local italic  = {
 	["poj"] = true,
+	["tl"] = true,

@@ at line 136 @@
-	local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "sl", "poj", "zhu", "l", "tr"}
+	local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "sl", "poj", "tl", "zhu", "l", "tr"}

@@ after line 150 @@ if (poj1) then
		orderlist[4] = "poj"
-		orderlist[5] = "p"
-		orderlist[6] = "tp"
-		orderlist[7] = "w"
-		orderlist[8] = "j"
-		orderlist[9] = "cy"
-		orderlist[10] = "sl"
+		orderlist[5] = "tl"
+		orderlist[6] = "p"
+		orderlist[7] = "tp"
+		orderlist[8] = "w"
+		orderlist[9] = "j"
+		orderlist[10] = "cy"
+		orderlist[11] = "sl"
	end

MSG17 (talk) 15:53, 17 August 2024 (UTC)[reply]

Further romanization discussion

[edit]

Coming off of my request to add Tâi-lô, what other romanization systems should be added to the template? I feel like Pha̍k-fa-sṳ annd Wugniu could be helpful. I don't see any IANA latn subtages for other Sinitic languages however. MSG17 (talk) 15:53, 17 August 2024 (UTC)[reply]