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

מאין תקציר עריכה
מאין תקציר עריכה
שורה 311: שורה 311:
    elseif propValue['type'] == 'globecoordinate' then
    elseif propValue['type'] == 'globecoordinate' then
    local frame = mw.getCurrentFrame()
    local frame = mw.getCurrentFrame()
    local formattedValue = frame:expandTemplate{ title = 'Coord', args = { propValue.value.latitude, propValue.value.longitude, display = 'inline' } }
    local formattedValue
    local globe = propValue.value.globe
    if globe == 'Q2' then globe = nil
    else
    local globeMapping = require('Module:Wikidata/Globes')
    if globeMapping['http://www.wikidata.org/entity/' .. globe] then
    globe = 'globe:' .. globeMapping['http://www.wikidata.org/entity/' .. globe]
    else
    globe = nil
    end
end
    if globe then
    formattedValue = frame:expandTemplate{ title = 'Coord', args = { propValue.value.latitude, propValue.value.longitude, globe, display = options['coord-display'] or 'inline' } }
    else
    formattedValue = frame:expandTemplate{ title = 'Coord', args = { propValue.value.latitude, propValue.value.longitude, display = options['coord-display'] or 'inline' } }
    end
    table.insert(resTable, formattedValue)
    table.insert(resTable, formattedValue)
    else
    else