Module:Lang-zh: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
merge changes from sandbox per talk
Jackmcbarn (talk | contribs)
update from sandbox per talk
Line 86:
local uselabels = not (args["labels"] == "no") -- whether to have labels
local t1 = false -- whether traditional Chinese characters go first
local j1 = false -- whether Cantonese Romanisations go first
local orderlisttestChar
if (args["first"]) then
t1 =for testChar in mw.ustring.gmatch(args["first"] ==, "t%a+") do
if (testChar == "t") then
else
t1 = true
end
if (testChar == "j") then
j1 = true
end
end
end
if (t1 == false) then
local title = mw.title.getCurrentTitle()
t1 = t1st[title.text] == true
end
 
-- based on setting/preference specify order
local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"}
local orderlist
if (t1) then
orderlist[2] = {"c", "t", "s", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"}
orderlist[3] = "s"
else
end
orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"}
if (j1) then
orderlist[4] = "j"
orderlist[5] = "cy"
orderlist[6] = "p"
orderlist[7] = "tp"
orderlist[8] = "w"
end