local p =
function p.link_url_for_current_page return p.link_url(mw.wikibase.getEntityIdForCurrentPage)end
function p.asciify(ft_id) ft_id = mw.ustring.gsub(ft_id, 'æ', 'ae') ft_id = mw.ustring.gsub(ft_id, 'ø', 'oe') ft_id = mw.ustring.gsub(ft_id, 'ð', 'oe') -- e.g. Sjúrður Skaale ft_id = mw.ustring.gsub(ft_id, 'ö', 'oe') -- e.g. Özlem Cekic ft_id = mw.ustring.gsub(ft_id, 'å', 'aa') ft_id = mw.ustring.gsub(ft_id, 'ú', 'u') -- e.g. Sjúrður Skaale ft_id = mw.ustring.gsub(ft_id, 'á', 'a') -- e.g. Annita á Fríðriksmørk ft_id = mw.ustring.gsub(ft_id, 'í', 'i') -- e.g. Annita á Fríðriksmørk return ft_idend
local url_prefix = 'https://www.thedanishparliament.dk/members/'
function p.link_url(entity) local prop = entity and mw.wikibase.getBestStatements(entity, 'P7882') if prop and prop[1] and prop[1].mainsnak.snaktype
return p