Content deleted Content added
Piece of code to allow customizing i18n in Module:Wikidata-i18n as well as the datetime format used by getDateValue and getQualifierDateValue |
Move the "article is not yet available" warning to i18n table and set debug=false |
||
Line 3:
local p = {}
local debug =
-- module local variables
Line 21:
["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"
},
["datetime"] =
Line 144 ⟶ 145:
out[#out + 1] = "[[" .. sitelink .. "|" .. label .. "]]"
else
out[#out + 1] = "[[:d:Q" .. v.mainsnak.datavalue.value["numeric-id"] .. "|" .. label .. "]]<abbr title='
end
end
Line 184 ⟶ 185:
out[#out + 1] = "[[" .. sitelink .. "|" .. label .. "]]"
else
out[#out + 1] = "[[:d:Q" .. v.mainsnak.datavalue.value["numeric-id"] .. "|" .. label .. "]]<abbr title='
end
end
Line 213 ⟶ 214:
out[#out + 1] = "[[" .. mw.wikibase.sitelink("Q" .. v2.datavalue.value["numeric-id"]) .. "]]"
else
out[#out + 1] = "[[:d:Q" .. v2.datavalue.value["numeric-id"] .. "|" .. mw.wikibase.label("Q" .. v2.datavalue.value["numeric-id"]) .. "]]<abbr title='
end
end
|