Module:Wikidata: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
withEditButton()
Undid revision 615270365 by Mxn (talk): wrong wiki!
लाइन 1:
local p = {}
local lang = mw.getContentLanguage()
 
-- This is used to get a normal wiki-linked value, or a comma separated list of them if multiple values exist
Line 80 ⟶ 79:
return input_parm
end
end
 
function p.withEditButton(frame)
local propertyID = mw.text.trim(frame.args[1] or "")
local input_parm = mw.text.trim(frame.args[2] or "")
local get = frame.args.get and p["get" .. lang:ucfirst(frame.args.get)]
local value = get and get(frame)
if value and input_parm == "FETCH_WIKIDATA" then
local edit_button = frame:expandTemplate{
title = "Sửa dữ liệu",
args = {
p = propertyID:match("%d+"),
},
}
return mw.ustring.format("%s %s", value, edit_button)
end
return input_parm
end
 
"https://bh.wikipedia.org/wiki/Module:Wikidata" से लिहल गइल