Module:TNT: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
imported>Lingam
" -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -..."-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது
 
imported>ExE Boss
Update from master using #Synchronizer
வரிசை 1:
--
 
-- INTRO: (!!! DO NOT RENAME THIS PAGE !!!)
-- This module allows any template or module to be copy/pasted between
வரிசை 50:
id = mw.text.trim(v)
elseif type(k) == 'number' then
table.insert(params,[k - 2] = mw.text.trim(v))
elseif k == 'lang' and v ~= '_' then
lang = mw.text.trim(v)
வரிசை 96:
local data = loadData(dataset)
local names = {}
for _, field in pairsipairs(data.schema.fields) do
table.insert(names, field.name)
end
 
local numOnly = true
local params = {}
local paramOrder = {}
for _, row in pairsipairs(data.data) do
local newVal = {}
local name = nil
for pos, valcolumnName in pairsipairs(rownames) do
local columnName = names[pos]
if columnName == 'name' then
name = valrow[pos]
else
newVal[columnName] = valrow[pos]
end
end
if name then
if (
(type(name) ~= "number")
and (
(type(name) ~= "string")
or not string.match(name, "^%d+$")
)
) then
numOnly = false
end
params[name] = newVal
table.insert(paramOrder, name)
வரி 120 ⟶ 129:
 
-- Work around json encoding treating {"1":{...}} as an [{...}]
if numOnly then
params['zzz123']=''
end
 
local json = mw.text.jsonEncode({
params=params,
paramOrder=paramOrder,
description=data.description,
})
 
if numOnly then
json = string.gsub(json,'"zzz123":"",?', "")
end
 
return json
வரி 157 ⟶ 170:
-- Give helpful error to thirdparties who try and copy this module.
if not mw.ext or not mw.ext.data or not mw.ext.data.get then
error(string.format([['''Missing JsonConfig extension;, Cannotor loadnot https://commons.wikimedia.org/wiki/Data:'properly .. dataset)configured;
Cannot load https://commons.wikimedia.org/wiki/Data:%s.
See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates''']], dataset))
end
 
"https://tamilar.wiki/w/Module:TNT" இலிருந்து மீள்விக்கப்பட்டது