בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,381
רעדאגירונגען
שרגא (שמועס | ביישטייערונגען) ק (1 רעוויזיע אימפארטירט: אימפארטירט פון די יידישע וויקיפעדיע, זע ביישטייערער ליסטע) |
אין תקציר עריכה |
||
| (6 מיטלסטע ווערסיעס פון 2 באַניצער נישט געוויזן.) | |||
| שורה 3: | שורה 3: | ||
local PropertyLink = require('Module:PropertyLink') | local PropertyLink = require('Module:PropertyLink') | ||
local ageModule = require('Module:עלטער') | local ageModule = require('Module:עלטער') | ||
local hebrewDateModule = require('Module: | local hebrewDateModule = require('Module:אידישע דאטום') | ||
local WikidataCrossValidation = require('Module:WikidataCrossValidation') | local WikidataCrossValidation = require('Module:WikidataCrossValidation') | ||
| שורה 20: | שורה 20: | ||
local function getDeathLabel(deathCause, entityId) | local function getDeathLabel(deathCause, entityId) | ||
entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() | --entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() | ||
if deathCause == nil and entityId ~= nil then | if deathCause == nil and entityId ~= nil then | ||
local deathCauseWikidata = mw.wikibase.getBestStatements(entityId, 'P1196') | local deathCauseWikidata = mw.wikibase.getBestStatements(entityId, 'P1196') | ||
| שורה 45: | שורה 45: | ||
function getEventDetails(generalDate, hebDate, eventPlace, propDate, propPlace, age, usingWikidata, entityId) | function getEventDetails(generalDate, hebDate, eventPlace, propDate, propPlace, age, usingWikidata, entityId) | ||
entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() | --entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() | ||
age = age or '' | age = age or '' | ||
local formattedEvent | local formattedEvent | ||
| שורה 80: | שורה 80: | ||
local latestDate = deathDate or birthDate | local latestDate = deathDate or birthDate | ||
if latestDate == nil then return end | if latestDate == nil then return end | ||
local dateModule = require('Module: | local dateModule = require('Module:דאטום') | ||
local success, res = pcall(dateModule.parseDateRange, latestDate, 'raw') | local success, res = pcall(dateModule.parseDateRange, latestDate, 'raw') | ||
if success==false then return end -- there is no known VALID date | if success==false then return end -- there is no known VALID date | ||
| שורה 122: | שורה 122: | ||
-- fill birth/death dates from wikidata is missing | -- fill birth/death dates from wikidata is missing | ||
usingBirthWikidata = fillWikidataParam(templateArgs, 'געבורט | usingBirthWikidata = fillWikidataParam(templateArgs, 'געבורט דאטום', 'P569', infoObj) | ||
usingDeathWikidata = fillWikidataParam(templateArgs, 'טויט | usingDeathWikidata = fillWikidataParam(templateArgs, 'טויט דאטום', 'P570', infoObj) | ||
local birthDate = getSpeculativeDate(templateArgs['געבורט | local birthDate = getSpeculativeDate(templateArgs['געבורט דאטום'], templateArgs['אידישע געבורט דאטום']) | ||
local deathDate = getSpeculativeDate(templateArgs['טויט | local deathDate = getSpeculativeDate(templateArgs['טויט דאטום'], templateArgs['אידישע טויט דאטום']) | ||
if birthDate~=nil then | if birthDate~=nil then | ||
| שורה 133: | שורה 133: | ||
age = ageModule.ageCalc(birthDate, nil, true, false, true) or '' | age = ageModule.ageCalc(birthDate, nil, true, false, true) or '' | ||
end | end | ||
local birthDetails, usingBirthWikidataEvent = getEventDetails(templateArgs['געבורט | local birthDetails, usingBirthWikidataEvent = getEventDetails(templateArgs['געבורט דאטום'], templateArgs['אידישע געבורט דאטום'], templateArgs['געבורט ארט'], 'P569', 'P19', age, usingBirthWikidata, infoObj.args.entityId) | ||
table.insert(infoObj.templateStructure, 1, { | table.insert(infoObj.templateStructure, 1, { | ||
label='געבורט', | label='געבורט', | ||
| שורה 151: | שורה 151: | ||
deathLabel = getDeathLabel(templateArgs['סיבת המוות'], infoObj.args.entityId) | deathLabel = getDeathLabel(templateArgs['סיבת המוות'], infoObj.args.entityId) | ||
local age = ageModule.ageCalc(birthDate, deathDate, false, false, true) or '' | local age = ageModule.ageCalc(birthDate, deathDate, false, false, true) or '' | ||
local deathDetails, usingDeathWikidataEvent = getEventDetails(templateArgs['טויט | local deathDetails, usingDeathWikidataEvent = getEventDetails(templateArgs['טויט דאטום'], templateArgs['אידישע טויט דאטום'], templateArgs['טויט ארט'], 'P570', 'P20', age, usingDeathWikidata, infoObj.args.entityId) | ||
table.insert(infoObj.templateStructure, 2, { | table.insert(infoObj.templateStructure, 2, { | ||
label=deathLabel, | label=deathLabel, | ||
| שורה 162: | שורה 162: | ||
table.insert(infoObj.templateStructure, 1, { | table.insert(infoObj.templateStructure, 1, { | ||
label=birthLabel, | label=birthLabel, | ||
data='{{{געבורט | data='{{{געבורט דאטום}}}<br/>{{{געבורט ארט}}}' | ||
}) | }) | ||
table.insert(infoObj.templateStructure, 2, { | table.insert(infoObj.templateStructure, 2, { | ||
label=deathLabel, | label=deathLabel, | ||
data='{{{טויט | data='{{{טויט דאטום}}} <br/>{{{טויט ארט}}}' | ||
}) | }) | ||
end | end | ||
רעדאגירונגען