Module:Coordinates: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
imported>Sukanthi "--[[ This module is intended to replace the functionality of {{Coord}} and related templates. It provides several methods, including {{#invoke:Coordinates | coord }} : General function formatting and displaying coordinate values. {{#invoke:Coordinates | dec2dms }} : Simple function for converting decimal degree values to DMS format. {{#invoke:Coordinates | dms..."-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது |
No edit summary |
||
| (3 பயனர்களால் செய்யப்பட்ட 6 இடைப்பட்ட திருத்தங்கள் காட்டப்படவில்லை.) | |||
வரிசை 1:
--[[
This module is changed from original don't edit
This module is intended to replace the functionality of {{Coord}} and related
templates. It provides several methods, including
வரி 24 ⟶ 26:
local current_page = mw.title.getCurrentTitle()
local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' );
local coord_link = 'https://geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '¶ms='
--[[ Helper function, replacement for {{coord/display/title}} ]]
local function displaytitle(
▲ .. mw.getCurrentFrame():extensionTag{
}
▲ name = 'indicator',
▲ args = { name = 'coordinates' },
▲ content = '<span id="coordinates">[[புவியியல் ஆள்கூற்று முறை|ஆள்கூறுகள்]]: ' .. coords .. '</span>'
end
வரி 161 ⟶ 159:
name = 'templatestyles', args = { src = stylesheetLink }
} .. '<span class="plainlinks nourlexpansion">[' .. coord_link .. uriComponents ..
' ' .. inner .. ']</span>' .. '[[Category:Pages using gadget WikiMiniAtlas]]'
end
வரி 468 ⟶ 466:
else
-- Error
return errorPrinter({{"formatTest", "Unknown argument format"}}) .. '[[
end
result.name = args.name
வரி 481 ⟶ 479:
local ret = specPrinter(args, result)
if #errors > 0 then
ret = ret .. ' ' .. errorPrinter(errors) .. '[[
end
return ret, backward
வரி 644 ⟶ 642:
end
if string.find(result, "The format of the coordinate could not be determined") ~= nil then
-- We wanted the #coordinates parser function from Extension:GeoData,
-- but we got the one from Extension:Maps instead :(
result = nil
end
return result or ''
end
local text = ''
if isInline(Display) then
text = text .. '<span class="geo-inline">' .. contents .. Notes .. '</span>'
end
if isInTitle(Display) then
-- Add to output since indicator content is invisible to Lua later on
text = text .. displaytitle(contents, Notes) .. makeWikidataCategories(args.qid)▼
if not isInline(Display) then
text = text .. '<span class="geo-inline-hidden noexcerpt">' .. contents .. Notes .. '</span>'
end
end
if not args.nosave then
வரி 687 ⟶ 695:
]]
function coordinates.
if
if
local result, negative = mw.text.split((mw.ustring.match(
if
result, negative = result[1], 'S'
else
வரி 701 ⟶ 709:
return result[1]
else
return mw.ustring.match(
end
end
function coordinates.coord2text(frame)
return coordinates._coord2text(frame.args[1],frame.args[2])
end
வரி 750 ⟶ 762:
end
-- replace the existing indicator with a new indicator using the modified content
frame.args[1] = mw.ustring.gsub(
frame.args[1],
'(<span class="geo%-inline[^"]*">(.+)</span>)\127[^\127]*UNIQ%-%-indicator%-%x+%-%-?QINU[^\127]*\127',
function (
)
| |||