Module:Citation/CS1: Difference between revisions

From AviationSafetyX Wiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
local cfg = {}
local cfg = {}


cfg.date_names = {
local success, result = pcall(function()
en = {
return mw.loadData('Module:Citation/CS1/Configuration')
long = {
end)
January = "January", February = "February", March = "March",
 
April = "April", May = "May", June = "June",
if success and result and type(result.date_names) == 'table' then
July = "July", August = "August", September = "September",
cfg = result
October = "October", November = "November", December = "December"
else
},
cfg.date_names = {
short = {
en = {
January = "Jan", February = "Feb", March = "Mar",
long = {
April = "Apr", May = "May", June = "Jun",
January = "January", February = "February", March = "March",
July = "Jul", August = "Aug", September = "Sep",
April = "April", May = "May", June = "June",
October = "Oct", November = "Nov", December = "Dec"
July = "July", August = "August", September = "September",
October = "October", November = "November", December = "December"
},
short = {
January = "Jan", February = "Feb", March = "Mar",
April = "Apr", May = "May", June = "Jun",
July = "Jul", August = "Aug", September = "Sep",
October = "Oct", November = "Nov", December = "Dec"
}
}
}
}
}
}
end


return cfg
return cfg

Revision as of 11:57, 31 March 2025

<section begin=header /><templatestyles src="Module:Message box/ombox.css"></templatestyles>

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

Lua error: bad argument #1 to "get" (not a valid title).<section end=header /> This module and associated sub-modules support the Citation Style 1 and Citation Style 2 citation templates. In general, it is not intended to be called directly, but is called by one of the core CS1 and CS2 templates. <section begin=module_components_table /> These files comprise the module support for CS1|2 citation templates:

CS1 | CS2 modules
live sandbox diff description
Gold padlock Module:Citation/CS1 Module:Citation/CS1/sandbox [edit] diff Rendering and support functions
Module:Citation/CS1/Configuration Module:Citation/CS1/Configuration/sandbox [edit] diff Translation tables; error and identifier handlers
Module:Citation/CS1/Whitelist Module:Citation/CS1/Whitelist/sandbox [edit] diff List of active and deprecated CS1|2 parameters
Module:Citation/CS1/Date validation Module:Citation/CS1/Date validation/sandbox [edit] diff Date format validation functions
Module:Citation/CS1/Identifiers Module:Citation/CS1/Identifiers/sandbox [edit] diff Functions that support the named identifiers (ISBN, DOI, PMID, etc.)
Module:Citation/CS1/Utilities Module:Citation/CS1/Utilities/sandbox [edit] diff Common functions and tables
Module:Citation/CS1/COinS Module:Citation/CS1/COinS/sandbox [edit] diff Functions that render a CS1|2 template's metadata
Module:Citation/CS1/styles.css Module:Citation/CS1/sandbox/styles.css [edit] diff CSS styles applied to the CS1|2 templates
Silver padlock Module:Citation/CS1/Suggestions Module:Citation/CS1/Suggestions/sandbox [edit] diff List that maps common erroneous parameter names to valid parameter names

<section end=module_components_table />

Other documentation:

testcases


local cfg = {}

local success, result = pcall(function()
	return mw.loadData('Module:Citation/CS1/Configuration')
end)

if success and result and type(result.date_names) == 'table' then
	cfg = result
else
	cfg.date_names = {
		en = {
			long = {
				January = "January", February = "February", March = "March",
				April = "April", May = "May", June = "June",
				July = "July", August = "August", September = "September",
				October = "October", November = "November", December = "December"
			},
			short = {
				January = "Jan", February = "Feb", March = "Mar",
				April = "Apr", May = "May", June = "Jun",
				July = "Jul", August = "Aug", September = "Sep",
				October = "Oct", November = "Nov", December = "Dec"
			}
		}
	}
end

return cfg