Module:Quotations/documentation

Hello, you have come here looking for the meaning of the word Module:Quotations/documentation. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:Quotations/documentation, but we will also tell you about its etymology, its characteristics and you will know how to say Module:Quotations/documentation in singular and plural. Everything you need to know about the word Module:Quotations/documentation you have here. The definition of the word Module:Quotations/documentation will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:Quotations/documentation, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module is used by Template:Q.

Coding

The intent of this module was to make a quotations library which can be built and used asynchronously. An editor can reference a work or author which is not yet coded, and the display will still look fine, and if the information is later coded, the template will make use of it at that time.

Language modules

Each language needs its own data module, such as that found at Module:Quotations/grc/data, which is processed by the methods in the main module. Additional methods may be added for processing the data at, for example, Module:Quotations/grc, which is used as a starting point for building the language module. If this does not exist, the methods in the main module will still be available.

The data module should be a table, with entries for each author. Each author table should include information about the author, such as years active and the title of the Wikipedia article for the author, as well as tables for each of its works, with information such as the year the work was written, the title of its Wikipedia article, and the title of its Wiksource article. Alias tables can be used for convergence, such as when a work might have two common titles, as well as abbreviations.

Note that the module is designed to work with whatever data is available, and it should not be considered necessary to add all possible data; some is better than none.

Note: In order for a language module to be recognized, the corresponding language code must be added to the hasData table in this module.

One of the more complex aspects of coding the data set lies in the reference link, which is meant to be a fairly dynamic link which formats itself to account for information given. It is formatted in the author's data table as a table of strings and tables. Strings not prefixed by a period are inserted as is. Strings prefixed with a period indicate variable references. Tables which begin with a function run that function with the table's following elements as parameters. Tables not beginning with a function are nested variable addresses. Take the reference link format table data.Plato.rlFormat2, which is used solely by Plato's Republic:

{'s:el:', '.rlTitle', '/', {'.chapterSelect', {'authorData', 'republicChapters'}, '.ref1'}, '#p', '.ref1', {'.lower', '.ref2'} }

The first element, 's:el', is a simple string, and will be inserted as-is into the link target; it is the prefix for the Greek Wikisource, where a native language version of The Republic is found.

The second element, '.rlTitle', begins with a period, indicating that it should be replaced by the variable 'rlTitle', which is given in The Republic’s data table as 'Πολιτεία'.

The third element, '/', is a standard string, and will be inserted into the link as-is.

The fourth element is a function call, using the function chapterSelect, which is called with two parameters. The second parameter is the variable ref1, which is the chapter given by the user. The first parameter is formatted as a nested reference, it will be the variable republicChapters, which is found within data.Plato.

There is no getting around the fact that it is not the easiest format in the world, but it does make for a powerful and flexible engine to interpret data and create the proper link.

If the source is not wikilinkable, then you'll need an external reference link instead of a reference link. You can use the same method as reference links, except use '.xrlFormat' instead of '.rlFormat', and the URL to link to is the '.xurl' parameter for the work. For example:

data.xrlFormat1 = {'.xurl'}

data.works = {

		 = { = 'c. 334–337',  = 'https://archive.org/details/matheseoslibrivi02firmuoft',  = 1}

}

Language-specific submodules