יחידה:תבנית מידע: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 143: | שורה 143: | ||
local wbEdit='' -- link to wikidata | local wbEdit='' -- link to wikidata | ||
if self.args.usingWikidata then | if self.args.usingWikidata then | ||
wbEdit = '[[File:Wikidata-logo S.svg|22px|link=d:'..self.args.entityId..'|לעריכה בוויקינתונים שמשמש מקור לחלק מהמידע בתבנית]]' | |||
wbEdit = '[[File:Wikidata-logo S.svg|22px|link=d:'..entityId..'|לעריכה בוויקינתונים שמשמש מקור לחלק מהמידע בתבנית]]' | |||
wbEdit = wbEdit .. mw.ustring.format(' [[File:OOjs UI icon info big.svg|16px|link=%s]]', 'עזרה:תבנית מידע') | wbEdit = wbEdit .. mw.ustring.format(' [[File:OOjs UI icon info big.svg|16px|link=%s]]', 'עזרה:תבנית מידע') | ||
end | end | ||
| שורה 344: | שורה 343: | ||
if res then | if res then | ||
local missingTranslation = mw.ustring.find(res, '%[%[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית%]%]') | local missingTranslation = mw.ustring.find(res, '%[%[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית%]%]') | ||
local link = 'd:'.. | local link = 'd:'..entityId.. '#'..propertyName | ||
if not missingTranslation then | if not missingTranslation then | ||
res = res .. mw.ustring.format(' [[File:Blue pencil RTL.svg|15px|link=%s|עריכת הנתון בוויקינתונים]]', link) | res = res .. mw.ustring.format(' [[File:Blue pencil RTL.svg|15px|link=%s|עריכת הנתון בוויקינתונים]]', link) | ||
| שורה 457: | שורה 456: | ||
args.tableclass = frame.args['טבלה-מחלקה'] | args.tableclass = frame.args['טבלה-מחלקה'] | ||
args.subtemplate = frame.args['תת-תבנית'] | args.subtemplate = frame.args['תת-תבנית'] | ||
args.entityId = templateArgs['qid'] or mw.wikibase.getEntityIdForCurrentPage() | |||
local isSelfUse = (mw.title.getCurrentTitle().namespace==10) | local isSelfUse = (mw.title.getCurrentTitle().namespace==10) | ||
self.autoDocumentation = frame.args['תיעוד-אוטומטי'] | self.autoDocumentation = frame.args['תיעוד-אוטומטי'] | ||
| שורה 520: | שורה 520: | ||
-- use wikidata / remove unused parameters | -- use wikidata / remove unused parameters | ||
if not isSelfUse then | if not isSelfUse then | ||
local entriesToRemove = {} | local entriesToRemove = {} | ||
local crossValidatedFields = {} | local crossValidatedFields = {} | ||
| שורה 535: | שורה 534: | ||
if m then | if m then | ||
m = mw.uri.decode( m ) -- some templates may add encoding and are preprocessed before | m = mw.uri.decode( m ) -- some templates may add encoding and are preprocessed before | ||
local inWikidata, maintainceCats = fillMissingParamFromWikidata(m, templateParams, v, entityId, frame) | local inWikidata, maintainceCats = fillMissingParamFromWikidata(m, templateParams, v, args.entityId, frame) | ||
if maintainceCats then | if maintainceCats then | ||
table.insert(wikidataCats, maintainceCats) | table.insert(wikidataCats, maintainceCats) | ||