Module:Sandbox/Trappist the monk/Wiktionary/make data explained

-- use this module to make the data that goes in Module:Sandbox/Trappist the monk/Wiktionary/data. See main.

--

local c = ;local p = ;local s = ;

local m = ;

m["aa"] =

m["ab"] =

m["ae"] =

m["af"] =

m["ak"] =

m["am"] =

m["an"] =

m["ar"] =

m["as"] =

m["av"] =

m["ay"] =

m["az"] =

m["ba"] =

m["be"] =

m["bg"] =

m["bh"] =

m["bi"] =

m["bm"] =

m["bn"] =

m["bo"] =

m["br"] =

m["ca"] =

m["ce"] =

m["ch"] =

m["co"] =

m["cr"] =

m["cs"] =

m["cu"] =

m["cv"] =

m["cy"] =

m["da"] =

m["de"] =

m["dv"] =

m["dz"] =

m["ee"] =

m["el"] =

m["en"] =

m["eo"] =

m["es"] =

m["et"] =

m["eu"] =

m["fa"] =

m["ff"] =

m["fi"] =

m["fj"] =

m["fo"] =

m["fr"] =

m["fy"] =

m["ga"] =

m["gd"] =

m["gl"] =

m["gn"] =

m["gu"] =

m["gv"] =

m["ha"] =

m["he"] =

m["hi"] =

m["ho"] =

m["ht"] =

m["hu"] =

m["hy"] =

m["hz"] =

m["ia"] =

m["id"] =

m["ie"] =

m["ig"] =

m["ii"] =

m["ik"] =

m["io"] =

m["is"] =

m["it"] =

m["iu"] =

m["ja"] =

m["jv"] =

m["ka"] =

m["kg"] =

m["ki"] =

m["kj"] =

m["kk"] =

m["kl"] =

m["km"] =

m["kn"] =

m["ko"] =

m["kr"] =

m["ks"] =

-- "kv" IS TREATED AS "koi", "kpv", SEE WT:LT

m["kw"] =

m["ky"] =

m["la"] =

m["lb"] =

m["lg"] =

m["li"] =

m["ln"] =

m["lo"] =

m["lt"] =

m["lu"] =

m["lv"] =

m["mg"] =

m["mh"] =

m["mi"] =

m["mk"] =

m["ml"] =

m["mn"] =

-- "mo" IS TREATED AS "ro", SEE WT:LT

m["mr"] =

m["ms"] =

m["mt"] =

m["my"] =

m["na"] =

m["nb"] =

m["nd"] =

m["ne"] =

m["ng"] =

m["nl"] =

m["nn"] =

m["no"] =

m["nr"] =

m["nv"] =

m["ny"] =

m["oc"] =

m["oj"] =

m["om"] =

m["or"] =

m["os"] =

m["pa"] =

m["pi"] =

m["pl"] =

m["ps"] =

m["pt"] =

m["qu"] =

m["rm"] =

m["ro"] =

m["ru"] =

m["rw"] =

m["sa"] =

m["sc"] =

m["sd"] =

m["se"] =

m["sg"] =

m["sh"] =

m["si"] =

m["sk"] =

m["sl"] =

m["sm"] =

m["sn"] =

m["so"] =

m["sq"] =

m["ss"] =

m["st"] =

m["su"] =

m["sv"] =

m["sw"] =

m["ta"] =

m["te"] =

m["tg"] =

m["th"] =

m["ti"] =

m["tk"] =

m["tl"] =

m["tn"] =

m["to"] =

m["tr"] =

m["ts"] =

m["tt"] =

-- "tw" IS TREATED AS "ak", SEE WT:LT

m["ty"] =

m["ug"] =

m["uk"] =

m["ur"] =

m["uz"] =

m["ve"] =

m["vi"] =

m["vo"] =

m["wa"] =

m["wo"] =

m["xh"] =

m["yi"] =

m["yo"] =

m["za"] =

m["zh"] =

m["zu"] =

--

local function main local en_wiki_data = mw.loadData ('Module:Language/data'); -- load the data table local out_t = ; -- output goes here for wikt_tag, wikt_lang_t in pairs (m) do -- spin through getting tag and associated table if not en_wiki_data.languages[wikt_tag] then -- when en:Module:Language/data does not have matching language tag table.insert (out_t, string.format ('\t\t["%s"] = ', -- add wikt language tag and name to wikt_tag, wikt_lang_t[1] )); end end table.sort (out_t); -- ascending sort return table.concat (out_t, ',\n'); -- make a big string and doneend

----------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------

return