恪別𡧲版𢯢𢷮𧵑「模庉:Location map」

n 𠊝替文本-「Tập tin:」成「File:」
n 𠊝替文本-「Mô đun:」成「Module:」
 
(空顯示1番版於𡧲𧵑共𠊛用)
𣳔63: 𣳔63:
error('Cần định rõ tên của trang định rõ bản đồ định vị để sử dụng', 2)
error('Cần định rõ tên của trang định rõ bản đồ định vị để sử dụng', 2)
end
end
local moduletitle = mw.title.new('Mô đun:Location map/data/' .. map)
local moduletitle = mw.title.new('Module:Location map/data/' .. map)
if not moduletitle then
if not moduletitle then
error(string.format('%q không phải là tên hợp lệ của trang định rõ bản đồ định vị', map), 2)
error(string.format('%q không phải là tên hợp lệ của trang định rõ bản đồ định vị', map), 2)
elseif moduletitle.exists then
elseif moduletitle.exists then
local mapData = mw.loadData('Mô đun:Location map/data/' .. map)
local mapData = mw.loadData('Module:Location map/data/' .. map)
return function(name, params)
return function(name, params)
if name == nil then
if name == nil then
return 'Mô đun:Location map/data/' .. map
return 'Module:Location map/data/' .. map
elseif mapData[name] == nil then
elseif mapData[name] == nil then
return ''
return ''
𣳔79: 𣳔79:
end
end
end
end
elseif mw.title.new('Bản mẫu:Bản đồ định vị ' .. map).exists then
elseif mw.title.new('Template:Bản đồ định vị ' .. map).exists then
local cache = {}
local cache = {}
return function(name, params)
return function(name, params)
𣳔86: 𣳔86:
else
else
if name == nil then
if name == nil then
return 'Bản mẫu:Bản đồ định vị ' .. map
return 'Template:Bản đồ định vị ' .. map
elseif cache[name] == nil then
elseif cache[name] == nil then
cache[name] = frame:expandTemplate{title = 'Bản đồ định vị ' .. map, args = { name }}
cache[name] = frame:expandTemplate{title = 'Bản đồ định vị ' .. map, args = { name }}
𣳔93: 𣳔93:
end
end
end
end
elseif mw.title.new('Bản mẫu:Location map ' .. map).exists then
elseif mw.title.new('Template:Location map ' .. map).exists then
local cache = {}
local cache = {}
if type(frame) ~= 'table' or type(frame.expandTemplate) ~= 'function' then
if type(frame) ~= 'table' or type(frame.expandTemplate) ~= 'function' then
𣳔103: 𣳔103:
else
else
if name == nil then
if name == nil then
return 'Bản mẫu:Location map ' .. map
return 'Template:Location map ' .. map
elseif cache[name] == nil then
elseif cache[name] == nil then
cache[name] = frame:expandTemplate{title = 'Location map ' .. map, args = { name }}
cache[name] = frame:expandTemplate{title = 'Location map ' .. map, args = { name }}
𣳔111: 𣳔111:
end
end
else
else
error('Không tìm thấy trang định rõ bản đồ định vị. "Mô đun:Location map/data/' .. map .. '", "Bản mẫu:Bản đồ định vị ' .. map .. '", và "Bản mẫu:Location map ' .. map .. '" đều không tồn tại', 2)
error('Không tìm thấy trang định rõ bản đồ định vị. "Module:Location map/data/' .. map .. '", "Template:Bản đồ định vị ' .. map .. '", và "Template:Location map ' .. map .. '" đều không tồn tại', 2)
end
end
end
end
𣳔432: 𣳔432:
function p.mark(frame, args, map)
function p.mark(frame, args, map)
if not args then
if not args then
args = getArgs(frame, {wrappers = 'Bản mẫu:Bản đồ định vị~'})
args = getArgs(frame, {wrappers = 'Template:Bản đồ định vị~'})
end
end
local mapnames = {}
local mapnames = {}
𣳔477: 𣳔477:


-- if longitude or latitude then
-- if longitude or latitude then
-- error('Tọa độ từ [[Mô đun:Coordinates]] và tọa độ riêng lẻ không thể cả hai đều được cung cấp')
-- error('Tọa độ từ [[Module:Coordinates]] và tọa độ riêng lẻ không thể cả hai đều được cung cấp')
-- end
-- end
longitude = coord2text('longitude', args.coordinates)
longitude = coord2text('longitude', args.coordinates)
𣳔572: 𣳔572:
local caption_list = {}
local caption_list = {}
if not args then
if not args then
args = getArgs(frame, {wrappers = 'Bản mẫu:Bản đồ định vị', valueFunc = p.valueFunc})
args = getArgs(frame, {wrappers = 'Template:Bản đồ định vị', valueFunc = p.valueFunc})
end
end
if args.useWikidata == nil then
if args.useWikidata == nil then