10,731
edits
TheNightAvl (talk | contribs) (Fixed rhyme bug) |
TheNightAvl (talk | contribs) mNo edit summary |
||
Line 21: | Line 21: | ||
local args_frame = getArgs(frame) | local args_frame = getArgs(frame) | ||
local args = {} | local args = {} | ||
local word = mw.title.getCurrentTitle.text() | |||
local p = 1 | local p = 1 | ||
mw.log("——— Processing arguments ———") | mw.log("——— Processing arguments ———") | ||
while args_frame[p] do | while args_frame[p] do | ||
table.insert(args, args_frame[p]) | table.insert(args, args_frame[p]) | ||
mw.log("Argument " .. p .. ": " .. args_frame[p]) | mw.log("Argument " .. p .. ": " .. args_frame[p]) | ||
Line 35: | Line 35: | ||
local register = {["colloquial"] = "colloquial", ["formal"] = "formal"} | local register = {["colloquial"] = "colloquial", ["formal"] = "formal"} | ||
local dialect = {["hjádvanþs"] = "hjádvanþs", ["coastal"] = "coastal", ["insular"] = "insular"} | local dialect = {["hjádvanþs"] = "hjádvanþs", ["coastal"] = "coastal", ["insular"] = "insular"} | ||
-- get automations -- | -- get automations -- | ||
Line 77: | Line 75: | ||
local working_syllables = "" | local working_syllables = "" | ||
for i = | for i = 1, #args do | ||
mw.log("Processing argument " .. i .. ".") | mw.log("Processing argument " .. i .. ".") | ||
if parameter[args[i]] ~= nil then -- mode changer | if parameter[args[i]] ~= nil then -- mode changer | ||
Line 217: | Line 215: | ||
rhymes_show = "\n* Rhymes:" | rhymes_show = "\n* Rhymes:" | ||
for | for num, rhyme in ipairs(rhymes) do | ||
if num > 1 then | |||
rhymes_show = rhymes_show .. "," | |||
end | |||
rhymes_show = rhymes_show .. " <span class=\"IPA\">[[:Category:Rhymes:Radestrian/" .. rhyme .. "|-" .. rhyme .. "]]</span>[[Category:Rhymes:Radestrian/" .. rhyme .. "]]" | rhymes_show = rhymes_show .. " <span class=\"IPA\">[[:Category:Rhymes:Radestrian/" .. rhyme .. "|-" .. rhyme .. "]]</span>[[Category:Rhymes:Radestrian/" .. rhyme .. "]]" | ||
end | end |