אונטערשייד צווישן ווערסיעס פון "יחידה:WikidataCrossValidation"

402 בייטן אראפגענומען ,  פֿאַר 2 יאָר
קיין רעדאגירונג באמערקונג
קאין תקציר עריכה
 
אין תקציר עריכה
 
(6 מיטלסטע ווערסיעס פון 4 באַניצער נישט געוויזן.)
שורה 2: שורה 2:
Cross validation with wikidata: parse the wikitext of a value related to wikidata and see if they are close enough.
Cross validation with wikidata: parse the wikitext of a value related to wikidata and see if they are close enough.
]]
]]
local Date = require('יחידה:תאריך')
local Date = require('יחידה:דאטום')
local CrossValidate = {}
local CrossValidate = {}
CrossValidate.CrossValidateResult = {
CrossValidate.CrossValidateResult = {
שורה 13: שורה 13:


function CrossValidate.maintainceCategory(value, propertyName)  
function CrossValidate.maintainceCategory(value, propertyName)  
if value==CrossValidate.CrossValidateResult.INVALID_WIKITEXT then return '' end
return ''
return '[[קטגוריה: ויקינתונים - השוואת ערכים: ' .. value.. ']]' ..  '[[קטגוריה: ויקינתונים - השוואת ערכים: ' .. value.. ': '..(mw.wikibase.label( propertyName) or propertyName)..']]'
end
end
--function CrossValidate.crossValidate( wikitext, propertyName, allowMulti, allowNA, entityId, multiSeperator, optionalQualifier, genderAware )
--function CrossValidate.crossValidate( wikitext, propertyName, allowMulti, allowNA, entityId, multiSeperator, optionalQualifier, genderAware )
שורה 22: שורה 21:
end
end
      
      
    if entityId == nil then
    entityId = mw.wikibase.getEntityIdForCurrentPage()
    end
if entityId == nil then
if entityId == nil then
if mw.title.getCurrentTitle().namespace==0 then
if mw.title.getCurrentTitle().namespace==0 then