Modulu:Wikidata: berrikuspenen arteko aldeak

Ezabatutako edukia Gehitutako edukia
translations and localizations moved to Modulu:Wikidata/i18n
update, minor fixes
1. lerroa:
-- Master version: [[:ca:Module:Wikidata]]
-- compatible version: 2017013020170305-1
 
local p = {}
20. lerroa:
["site-not-found"] = "Wikimedia project not found.",
["unknown-datetime-format"] = "Unknown datetime format.",
["local-article-not-found"] = "Article is not yet available in this wiki.",
['not-from-content-page'] = "Do not invoke from content page. Use a template or use a module subpage like /sandbox for testing."
},
["datetime"] =
140 ⟶ 141 lerroa:
 
local function printDatavalueCoordinate(data, parameter)
local globetable = {Q2 = 'earth', Q111 = 'mars', Q405 = 'moon', Q308 = 'mercury'}
if parameter == 'latitude' then
241 ⟶ 242 lerroa:
ret, _ = string.gsub(d(i18n.datetime[10]), " 0+", " ") -- supress leading zeros in year
elseif parameter then
ret, _ = string.gsub(d(parameter), "([ %[])0+", " %1") -- supress leading zeros in year optionally linked
else
-- ret, _ = string.gsub(d(i18n.datetime[11]), " 0+", " ")
407 ⟶ 408 lerroa:
-- A la consola de depuració useu: =p._debug({item="Q...", property="P...", ...})
function p._debug(args)
return p._main(args)
end
 
function p.claim(frame)
--if mw.title.new(frame:getParent():getTitle()).isContentPage and not mw.title.new(frame:getTitle()).isSubpage then
return _main(frame.args)
-- -- invoked from a content page and not invoking a module subpage
-- if frame.args["showerrors"] then
-- return printError("not-from-content-page")
-- else
-- return frame.args.default
-- end
--end
return p._main(frame.args)
end
 
function p._main(args)
--If a value is already set, use it
if args.value and args.value ~= '' then
756 ⟶ 765 lerroa:
local label, link
id, link = getPropertyValue(id, propertyFetch, "internallink")
if label and linkid then
_, label = getPropertyValue(id, propertyInstance, "label")
if label and link then
if label =and case(label,link "infoboxlabel")then
label = case(label, "infoboxlabel")
if labelShow == nil or labelFilter[label] then
result[#resultif + 1]labelShow == {nil or labelFilter[label,] link}then
result[#result + 1] = {label, link}
end
end
if label == lastlabel then
break
end
else
break
end