יחידה:תבנית מידע: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מ ביטול גרסה 23150100 של ערן (שיחה)
שורה 250: שורה 250:
self:removeEmptyHeaders()
self:removeEmptyHeaders()
-- error if there is no data/structure given to template from wiki page or wikidata
-- error if there is no data/structure given to template from wiki page or wikidata
if (#self.templateStructure)==0 then
if ((#self.templateStructure)==0) and not self.args.subtemplate then
if not self.args.subtemplate then
local templateTitle = mw.getCurrentFrame():getParent():getTitle()
local templateTitle = mw.getCurrentFrame():getParent():getTitle()
errors = {}
errors = {}
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית מידע]]')
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית מידע]]')
if mw.title.getCurrentTitle().namespace==0 then
if mw.title.getCurrentTitle().namespace==0 then
local templateName = mw.ustring.gsub(templateTitle, 'תבנית:', '', 1)
local templateName = mw.ustring.gsub(templateTitle, 'תבנית:', '', 1)
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית '..templateName..']]')
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית '..templateName..']]')
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות]]' )
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות]]' )
else
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות מחוץ למרחב הערכים]]')
end
return table.concat(errors, '')
else
else
return ''
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות מחוץ למרחב הערכים]]')
end
end
return table.concat(errors, '')
end
end