בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,368
רעדאגירונגען
ק (rv) |
(דערווייל צו רוי) |
||
| (13 מיטלסטע ווערסיעס פון 5 באַניצער נישט געוויזן.) | |||
| שורה 32: | שורה 32: | ||
--[[ Helper function, replacement for {{coord/display/title}} ]] | --[[ Helper function, replacement for {{coord/display/title}} ]] | ||
function displaytitle (s, notes) | function displaytitle (s, notes) | ||
local l = "[[געאגראפישע קאארדינאטן|קאארדינאטן]]: " .. s | local l = "[[:yi:רוי:געאגראפישע קאארדינאטן|קאארדינאטן]]: " .. s | ||
local co = '<span id="coordinates">' .. l .. notes .. '</span>'; | local co = '<span id="coordinates" style="font-size: small;">' .. l .. notes .. '</span>'; | ||
return ' | |||
return globalFrame:extensionTag{ | |||
name = 'indicator', | |||
content = co, | |||
args = { name = '0-coord' } | |||
}; | |||
end | end | ||
| שורה 170: | שורה 175: | ||
end | end | ||
local geodmshtml = '<span class="geo-dms" title=" | local geodmshtml = '<span class="geo-dms" title="דערנעבנדיגע ארטיקלען אויף המכלול">' | ||
.. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> ' | .. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> ' | ||
.. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>' | .. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>' | ||
| שורה 190: | שורה 195: | ||
end | end | ||
local geodechtml = '<span class="geo-dec" title=" | local geodechtml = '<span class="geo-dec" title="דערנעבנדיגע ארטיקלען אויף המכלול">' | ||
.. geodeclat .. ' ' | .. geodeclat .. ' ' | ||
.. geodeclong | .. geodeclong | ||
| שורה 215: | שורה 220: | ||
end | end | ||
return ' | return '[[באַזונדער:בסביבה#/coord/' ..coordinateSpec["dec-lat"] .. ',' .. coordinateSpec["dec-long"] .. '|' .. inner .. ']]'..' [[טעקע:Black Globe icon.svg|15px|קישור=' .. coord_link .. uriComponents .. '|מאפעס, בילדער פון דער הייעך און נאך אינפארמאציע אויף דעם ארט]]' | ||
end | end | ||
| שורה 310: | שורה 314: | ||
return specPrinter( args, result ) | return specPrinter( args, result ) | ||
else | else | ||
return specPrinter( args, result ) .. " " .. errorPrinter(errors) .. '[[קאטעגאריע:בלעטער מיט | return specPrinter( args, result ) .. " " .. errorPrinter(errors) .. '[[קאטעגאריע:בלעטער מיט פעלערדיגע קאארדינאטן טעגס]]'; | ||
end | end | ||
end | end | ||
| שורה 601: | שורה 605: | ||
text = text .. displaytitle(contents, Notes) | text = text .. displaytitle(contents, Notes) | ||
-- Add a Wikidata category for mainspace pages. | -- Add a Wikidata category for mainspace pages. | ||
if mw.wikibase and current_page.namespace == 0 then | if mw.wikibase and current_page.namespace == 0 and mw.wikibase.getEntityIdForCurrentPage() then | ||
local wikidata_cat | local wikidata_cat | ||
local | local wd_coord = mw.wikibase.getBestStatements( mw.wikibase.getEntityIdForCurrentPage(), 'P625' ) | ||
if | local snaktype | ||
-- fallback to P159 | |||
if | if not (wd_coord and wd_coord[1]) then | ||
wd_coord = mw.wikibase.getBestStatements( mw.wikibase.getEntityIdForCurrentPage(), 'P159' ) | |||
if #wd_coord > 0 and wd_coord[1].qualifiers and wd_coord[1].qualifiers and wd_coord[1].qualifiers['P625'] then | |||
snaktype = wd_coord[1].qualifiers['P625'][1].snaktype | |||
end | end | ||
else | else | ||
wikidata_cat = '[[קאטעגאריע:קאארדינאטן נישט אויף | snaktype= wd_coord[1].mainsnak.snaktype | ||
end | |||
if snaktype == 'value' then | |||
wikidata_cat = '[[קאטעגאריע:קאארדינאטן אויף וויקידאטא]]' -- coordinates exist both here and on Wikidata, and can be compared | |||
else | |||
wikidata_cat = '[[קאטעגאריע:קאארדינאטן נישט אויף וויקידאטא]]' -- we have to either import the coordinates to Wikidata or remove them here | |||
end | end | ||
if wikidata_cat then | if wikidata_cat then | ||
| שורה 635: | שורה 642: | ||
if frame.args[1] == "latitude" or frame.args[1] == "longitude" or frame.args[1] == "precision" or frame.args[1] == "dimension" or frame.args[1] == "globe" then | if frame.args[1] == "latitude" or frame.args[1] == "longitude" or frame.args[1] == "precision" or frame.args[1] == "dimension" or frame.args[1] == "globe" then | ||
local claimName = args['claim'] or 'P625' | local claimName = args['claim'] or 'P625' | ||
local entityId = mw.wikibase.getEntityIdForCurrentPage() | |||
if entityId == nil then return nil end | |||
local wd_coord = mw.wikibase.getBestStatements( entityId, claimName ) | |||
if wd_coord==nil or #wd_coord==0 then return nil end | |||
myValue = wd_coord[1] | |||
local qualifierId = args['qualifier'] | |||
if qualifierId then | |||
myValue = myValue.qualifiers[qualifierId][1].datavalue.value[frame.args[1]] | |||
else | |||
myValue = myValue.mainsnak.datavalue.value[frame.args[1]] | |||
end | |||
if frame.args[1] == "globe" then | |||
globeId = mw.ustring.match( myValue, "Q%d+" ) | |||
myValue = myGlobes[globeId] | |||
end | |||
return myValue | |||
else | else | ||
return nil | return nil | ||
רעדאגירונגען