Различие между версиями «Модуль:User:Vitalik/inflection»

[отпатрулированная версия][отпатрулированная версия]
Содержимое удалено Содержимое добавлено
м v2.1.8: fix
м v2.1.8: latest fix
Строка 59:
local template = unit.template(base, args)
 
local output = ''frame:expandTemplate{title=template, args=forms }
 
-- output = '{{' .. template .. '\n'
-- mw.log(forms['gen-pl'])
-- for key, value in pairs(forms) do
-- forms['gen-pl'] = frame:preprocess{forms['gen-pl']}
-- output = output .. '|' .. key .. '=' .. value .. '\n'
-- mw.log(forms['gen-pl'])
-- mw.log(key .. ' => ' .. type(key))
-- output = output .. frame:expandTemplate{title=template, args=forms}
-- mw.log(value .. ' => ' .. type(value))
output = '{{' .. template .. '\n'
-- end
for key, value in pairs(forms) do
-- output = output .. '|' .. key .. '=' .. value .. '\n}}'
 
mw.log(key .. ' => ' .. type(key))
if forms['error'] and forms['error'] ~= '' then
mw.log(value .. ' => ' .. type(value))
end
output = output .. '}}'
if forms['error'] then
output = output .. '\n' .. wu.div_red(forms['error'])
end
if forms['error_category'] and forms['error_category'] ~= '' then
output = output .. '[[Категория:' .. forms['error_category'] .. ']]'
end
 
mw.log(output)
-- return frame:preprocess(output)
return output
end