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

מ 47 גרסאות של הדף wikipedia:he:יחידה:גיל_לערכי_אישים יובאו
מ 5 גרסאות של הדף wikipedia:he:יחידה:גיל_לערכי_אישים יובאו
 
(7 גרסאות ביניים של 4 משתמשים אינן מוצגות)
שורה 125: שורה 125:
if gender == nil and entityId~=nil then
if gender == nil and entityId~=nil then
local PropertyLink = require('Module:PropertyLink')
local PropertyLink = require('Module:PropertyLink')
gender = PropertyLink.getPropertyByOptions( 'P21', entityId )
gender = PropertyLink.getItem( 'P21', entityId )
if (gender == "Q6581097") then -- male
gender = 'זכר'
elseif (gender == "Q2449503") then -- transgender male
gender = 'זכר'
elseif (gender == "Q15145778") then -- cisgender male
gender = 'זכר'
elseif (gender == "Q6581072") then -- female
gender = 'נקבה'
elseif (gender == "Q1052281") then -- transgender female
gender = 'נקבה'
elseif (gender == "Q15145779") then -- cisgender female
gender = 'נקבה'
end
end
end
prefix = 'גיל: '
prefix = 'גיל: '
if (gender == "אישה טרנסג'נדרית") then gender = 'נקבה' end
if (gender == "גבר טרנסג'נדר") then gender = 'זכר' end


if gender == 'נקבה' then
if gender == 'נקבה' then
שורה 195: שורה 205:
end
end
-- ignore warning in specific template
local noAgeWarning = false
if mw.getCurrentFrame():getParent():getTitle() == 'תבנית:אישיות תנ"כית' or mw.getCurrentFrame():getParent():getTitle() == 'תבנית:בעל חיים מפורסם' then
noAgeWarning = true
end
local title = mw.title.getCurrentTitle()
local title = mw.title.getCurrentTitle()
-- ignore warning in other namespace except the main NS
-- ignore warning in other namespace except the main NS
if title.namespace==0 then
if title.namespace==0 and not noAgeWarning then
if AgeYears > 139 then  
if AgeYears > 139 then  
table.insert(warnings, Errors['future-date'])
local instanceOf = entityId and mw.wikibase.getBestStatements( entityId, 'P31' )
local isHuman = instanceOf and instanceOf[1].mainsnak and instanceOf[1].mainsnak.datavalue.value.id=='Q5'
if isHuman then
table.insert(warnings, Errors['future-date'])
end
elseif AgeYears>109 then  
elseif AgeYears>109 then  
table.insert(warnings, '[[קטגוריה:אישים שהגיעו לגיל 110]]')
table.insert(warnings, '[[קטגוריה:אישים שהגיעו לגיל 110]]')