ਮੌਡਿਊਲ:Infobox body of water trackingDocumentation for this module may be created at ਮੌਡਿਊਲ:Infobox body of water tracking/doc local p = {}
function p.tracking(frame)
local function isblank( val )
return (val == nil) or val:match('^[%s]*$')
end
local function hasnoconvert( val )
local res = nil
val = mw.text.killMarkers(val)
if val:match('[0-9]') then
res = 1
if val:match('[%(][−0-9%.]') and val:match('[%)]') then
res = nil
end
end
return res
end
local cats = ''
local args = frame:getParent().args
local AZ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
if (isblank(args['image']) and isblank(args['image_lake']) ) then
cats = cats .. '[[Category:Wikipedia infobox body of water articles without image]]'
end
if isblank(args['coords']) and isblank(args['coordinates']) then
cats = cats .. '[[Category:Wikipedia infobox body of water articles without coordinates]]'
end
local duplicate_parameters = 0
local unknown_parameters = 0
if (args['child'] and args['embed']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['name'] and args['lake_name']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['image'] and args['image_lake']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['alt'] and args['alt_lake']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['caption'] and args['caption_lake']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['coordinates'] and args['coords']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['lake_type'] and args['type']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['ocean_type'] and args['type']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['part_of'] and args['parent']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['basin_countries'] and args['countries']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['catchment_km2'] and args ['catchment']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['length_km'] and args['length']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['width_km'] and args['width']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['area_km2'] and args['area']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['depth_m'] and args['depth']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['max-depth_m'] and args['max-depth']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['volume_km3'] and args['volume']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['shore_km'] and args['shore']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['elevation_m'] and args['elevation']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['settlements'] and args['cities']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['extra'] and args['nrhp']) then
duplicate_parameters = duplicate_parameters + 1
end
if (args['extra'] and args['embedded']) then
duplicate_parameters = duplicate_parameters + 1
end
if (duplicate_parameters > 0) then
cats = cats .. '[[Category:Wikipedia infobox body of water articles ' ..
'using duplicate parameters|' ..
string.sub(AZ, duplicate_parameters, duplicate_parameters+1) .. ']]'
end
local deprecated_parameters = 0
if hasnoconvert(args['catchment'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['length'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['width'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['area'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['depth'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['max-depth'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['volume'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['shore'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['elevation'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['temperature_low'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if hasnoconvert(args['temperature_high'] or '') then
deprecated_parameters = deprecated_parameters + 1
end
if (deprecated_parameters > 0) then
cats = cats .. '[[Category:Wikipedia infobox body of water articles ' ..
'using deprecated parameters|' ..
string.sub(AZ,deprecated_parameters, deprecated_parameters+1) .. ']]'
end
if (unknown_parameters > 0) then
cats = cats .. '[[Category:Pages using infobox body of water with unknown parameters]]'
end
return cats
end
return p
|
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve
Portal di Ensiklopedia Dunia