Module:Citation/CS1/Configuration

From AviationSafetyX Wiki
Jump to navigation Jump to search

{{#lst:Module:Citation/CS1/doc|header}} This configuration file contains various data that controls the functioning of Module:Citation/CS1 and hence the way that Lua-based citations are generated.

It has several sections among which are:

  1. translation tables that contain most of the literal strings that may be included in Lua-based citation. If editors are copying this Module to another wiki using a language other than English, then they should translate each of these values into that language.
  2. a list of error conditions specifying what text to display, what category to include (if any), and what help page section to refer to when errors are detected
  3. a list of ID handlers specifying the recognized document IDs, such as ISBN, DOI, etc., and how to format them.

{{#lst:Module:Citation/CS1/doc|module_components_table}}


local cfg = {}

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"
		}
	}
}

-- Optional safety check for any outer script trying to override nil
cfg.date_names = cfg.date_names or {}

return cfg