יחידה:תבנית מידע: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
|||
| שורה 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 | if ((#self.templateStructure)==0) and not self.args.subtemplate then | ||
local templateTitle = mw.getCurrentFrame():getParent():getTitle() | |||
errors = {} | |||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית מידע]]') | |||
if mw.title.getCurrentTitle().namespace==0 then | |||
local templateName = mw.ustring.gsub(templateTitle, 'תבנית:', '', 1) | |||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית '..templateName..']]') | |||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות]]' ) | |||
else | else | ||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות מחוץ למרחב הערכים]]') | |||
end | end | ||
return table.concat(errors, '') | |||
end | end | ||