Module:Citation/CS1/Configuration: Difference between revisions

Created page with "local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates --[[--------------------------< S E T T I N G S >-------------------------------------------------------------- boolean settings used to control various things. these setting located here to make them easy to find ]] -- these settings local to this module only local local_digits_from_mediawiki = false;..."
 
No edit summary
Tag: Reverted
Line 2,211: Line 2,211:
local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data
local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data
local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab'); -- attempt to load the tabular data from commons into <tab_data_t>
local tab_data_t = mw.ext.data.get('CS1/Identifier limits.tab')
if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false
 
id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category
if type(tab_data_t) ~= 'table' or type(tab_data_t.data) ~= 'table' then
else
id_limits_data_load_fail = true
for _, limit_t in ipairs (tab_data_t.data) do -- overwrite default <load_fail_limit> values from the data table in the tabular data
else
id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier
for _, limit_t in ipairs(tab_data_t.data) do
if limit_t[1] and limit_t[2] then
id_limits_data_t[limit_t[1]] = limit_t[2]
end
end
end
end
end
end




Line 2,634: Line 2,637:
citation_no_volume_t = citation_no_volume_t,
citation_no_volume_t = citation_no_volume_t,
}
}
end