local p = {} function p.main(frame) args = frame:getParent().args entity = mw.wikibase.getEntityObject()
text = '
title = mw.title.getCurrentTitle() if title.namespace == 2 then
text = text .. 'else if not (args.novariant or args["不轉換"]) then text = text .. require("Module:NoteTA").main{ G1 = "地名", G2 = "地區用詞" } end end
text = text..'text = text..(args.pgname or args["頁名"] or args["頁名"] or title.subpageText)
text = text..'disambig = args.disambig or args["消歧義"] or args["消歧義"] size = args.size or 25 if disambig then if disambig == 'yes' then disambig = title.text end text = text..'" end if args.UNESCO or args.unesco or args["世界遺產"] or args["世界遺產"] then text = text..'' end if args.star or args["明星"] then text = text..'' end if args.otbp or args["曲徑通幽"] or args["曲徑通幽"] then text = text..'' end if args.dotm or args["目的地"] then text = text..'' end if args.ftt or args["特色話題"] or args["特色話題"] then text = text..'' end
text = text..''
image = args[1] if (not image) or defaultimage[image] then if entity and entity.claims and entity.claims["P948"] and entity.claims["P948"][1].mainsnak.datavalue.value then image = entity.claims["P948"][1].mainsnak.datavalue.value else image = defaultimage[image or "none"] end end if title.namespace == 0 then if image == "Disambiguation banner.png" then text = text.. elseif args.index then elseif entity and entity.claims and entity.claims["P948"] and entity.claims["P948"][1].mainsnak.datavalue.value then text = text.. elseif defaultimage[image] then text = text.. else text = text.. end end
text = text..''..(args.caption or args["說明"] or args["說明"]) end text = text..''
if disambig then text = text..'\n:其他同名地點的條目,請見'..disambig..' (消歧義)。' end return text end
return p