Module talk:User:kc kennylau/japanese

If you still care about this at all
it's not working because the templates are expanded to, etc. (you can see this with lua). —suzukaze (t・c) 11:58, 12 November 2016 (UTC)

{{navbox|title=fixed|list1= local export = {}

local ja = require("Module:ja")

function export.convert(frame) local text = mw.text.unstripNoWiki(frame.args[1]) text = mw.ustring.gsub(text, "%* {{ja%-l|([^|=}]+)|([^|=}]*)|([^|=}]+)}}", function(a,b,c)		if ja.script(a):match("Hani") then			c = mw.ustring.gsub(c, "[A-ZĀĒĪŌŪ]", function(d) return "^" .. mw.ustring.lower(d) end)			b = ja.kata_to_hira(ja.romaji_to_kata(c))		end		return "* "	end) text = mw.ustring.gsub(text, "%* {{ja%-l|([^|=}]+)|([^|=}]*)}}", "* ") text = mw.ustring.gsub(text, "%* {{l|ja|([^|=}]+)|tr=%[%[([^|=}]+)%]%], ([^|=}]+)}}", function(a,b,c)		if ja.script(a):match("Hani") then			c = mw.ustring.gsub(c, "[A-ZĀĒĪŌŪ]", function(d) return "^" .. mw.ustring.lower(d) end)			b = ja.kata_to_hira(ja.romaji_to_kata(c))			return "* "		else			return "* "		end	end) text = mw.ustring.gsub(text, "%* {{l|ja|([^|=}]+)|tr=([^|=}]+), ([^|=}]+)}}", function(a,b,c)		if ja.script(a):match("Hani") then			c = mw.ustring.gsub(c, "[A-ZĀĒĪŌŪ]", function(d) return "^" .. mw.ustring.lower(d) end)			b = ja.kata_to_hira(ja.romaji_to_kata(c))		end		return "* "	end) text = mw.ustring.gsub(text, "%* {{l|ja|([^|=}]+)|tr=[^|=}]+}}", "* ") text = mw.ustring.gsub(text, "%* %[%[([^|=}]+)%]%] %(%[%[([^|=}]+)%]%]%)", function(a,b)		if ja.script(a):match("Hani") then			b = mw.ustring.gsub(b, "[A-ZĀĒĪŌŪ]", function(c) return "^" .. mw.ustring.lower(c) end)			b = ja.kata_to_hira(ja.romaji_to_kata(b))		end		return "* "	end) return text end

return export }}


 * : Thank you, you can edit my module directly. --kc_kennylau (talk) 13:20, 12 November 2016 (UTC)