local export = {}
local common = require("Module:fa-common")
local bs_stuff = require("Module:useful stuff")
local links = require("Module:User:ZxxZxxZ")
function export.main(frame)
local pframe = frame:getParent()
local args = pframe.args
local word = mw.title.getCurrentTitle().text
local tr = args; if tr == "" then tr = nil end
local c = args
local text = bs_stuff.tag_text(word, "fa", "strong", "fa-Arab")
if tr then
text = text .. " (<span lang=\"\">" .. tr .. "</span>)"
end
if c == "+" then
local comparative_word = word .. common.ZWNJ(word) .. "تر"
local superlative_word = word .. common.ZWNJ(word) .. "ترین"
text = text .. ", ''comparative'' "
if tr then
text = text .. links.annotated_link(comparative_word, nil, "fa", "span", "fa-Arab form-of comparative-form-of lang-fa transliteration-{{anchorencode:" .. tr .. "-tar}}", tr .. "-tar")
else
text = text .. links.annotated_link(comparative_word, nil, "fa", "span", "fa-Arab form-of comparative-form-of lang-fa")
end
text = text .. ", ''superlative'' "
if tr then
text = text .. links.annotated_link(superlative_word, nil, "fa", "span", "fa-Arab form-of superlative-form-of lang-fa transliteration-{{anchorencode:" .. tr .. "-tarin}}", tr .. "-tarin")
else
text = text .. links.annotated_link(superlative_word, nil, "fa", "span", "fa-Arab form-of superlative-form-of lang-fa")
end
end
if mw.title.getCurrentTitle().nsText == "" then
text = text .. "]"
end
return text
end
return export