Module:Cite/config and Module:Cite/config/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Trappist the monk
+TODO;
 
imported>Ahecht
m Cite_q → Cite_Q
 
Line 1: Line 1:
--local cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- TODO: in future, use this to replace current <known_templates_t> and <citation_classes_t>
--[[--------------------------< S E T T I N G S >--------------------------------------------------------------
--[[--------------------------< S E T T I N G S >--------------------------------------------------------------


Line 22: Line 20:
key is lowercase template name
key is lowercase template name


]]
--[[ TODO: in future, use this to replace current <known_templates_t> and <citation_classes_t>
local known_templates_t = {}; -- list of all known cs1|2 templates by their lowercase names.  key is lowercase template name
local citation_classes_t = {}; -- list of all known cs1|2 CitationClass values.  key is lowercase template name
for k, v in pairs (cfg.citation_class_map_t) do
local template = v:gsub ('cite ', ''):lower(); -- remove 'cite ' prefix, set template name to lowercase
known_templates_t[template] = true; -- add as a known template
citation_classes_t[template] = k; -- add to list of citation classes
end
]]
]]


Line 64: Line 52:
['thesis'] = true,
['thesis'] = true,
['web'] = true,
['web'] = true,
---------- templates that don't use [[Module:Citation/CS1]] directly ----------
['iucn'] = {'Module:Cite_IUCN', 'cite'},
['q'] = {'Module:Cite_Q', 'cite_q'},
['taxon'] = {'Module:Cite_taxon', 'main'},
['tweet'] = {'Module:Cite_tweet', 'main'},
}
}