יחידה:Sister project links: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מאין תקציר עריכה
שורה 138: שורה 138:
arg='ויקימינים',
arg='ויקימינים',
template='wikispecies',
template='wikispecies',
name='wikispecies'
name='specieswiki'
},
},
{
{
שורה 152: שורה 152:
for i, proj in ipairs(projects) do
for i, proj in ipairs(projects) do
if (not args[proj['arg']] or args[proj['arg']]==nil) and proj['name'] then
if (not args[proj['arg']] or args[proj['arg']]==nil) and proj['name'] then
args[proj['arg']] = mw.wikibase.sitelink(entity, proj['name'])
if proj['name'] == 'commons' then
local commonCat = mw.wikibase.getBestStatements( entity, 'P373' )
commonCat = commonCat and commonCat[1] and commonCat[1].mainsnak and commonCat[1].mainsnak.datavalue and commonCat[1].mainsnak.datavalue.value
args[proj['arg']] = commonCat
args['שם ' .. proj['arg']] = frame:getTitle()
else
args[proj['arg']] = mw.wikibase.sitelink(entity, proj['name'])
end
end
end
if args[proj['arg']] then
if args[proj['arg']] then