יחידה:תבנית מידע: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 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 | if (#self.templateStructure)==0 then | ||
if 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, '[[קטגוריה:שגיאות פרמטריות]]' ) | table.insert(errors, '[[קטגוריה:שגיאות פרמטריות בתבנית '..templateName..']]') | ||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות]]' ) | |||
else | |||
table.insert(errors, '[[קטגוריה:שגיאות פרמטריות מחוץ למרחב הערכים]]') | |||
end | |||
return table.concat(errors, '') | |||
else | else | ||
return '' | |||
end | end | ||
end | end | ||