Anonimo

Modulo:DTFunzioniComuni: differenze tra le versioni

Da Wikitrek.
Autogenerated cateogry with leading digit
(Auto generated categories)
(Autogenerated cateogry with leading digit)
Riga 162: Riga 162:
if AZInstancesMember[CurrentQ] ~= nil then
if AZInstancesMember[CurrentQ] ~= nil then
-- Generate auto A-Z Category
local FirstLetter
-- TDOO generate 09 for numeric labels
FirstLetter = string.upper(string.sub(mw.wikibase.getLabel(), 1, 1))
local FirstLetter = string.upper(string.sub(mw.wikibase.getLabel(), 1, 1))
if string.find(FirstLetter, "%d") ~= nil then
FirstLetter = "0-9"
end
AZCategory = "[[Category:" .. AZInstancesMember[CurrentQ] .. " - " .. FirstLetter .. "]]"
AZCategory = "[[Category:" .. AZInstancesMember[CurrentQ] .. " - " .. FirstLetter .. "]]"
return (table.concat(p.PropertiesOnTree("P68", 1, true))) .. AZCategory
return (table.concat(p.PropertiesOnTree("P68", 1, true))) .. AZCategory