<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fdoc</id>
	<title>Module:Convert/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Module:Convert/doc&amp;action=history"/>
	<updated>2026-08-04T13:20:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://afropedia.world/index.php?title=Module:Convert/doc&amp;diff=283&amp;oldid=prev</id>
		<title>Djehuti: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Module:Convert/doc&amp;diff=283&amp;oldid=prev"/>
		<updated>2024-05-31T14:08:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Transwiki guide|text=See [[Template:Convert/Transwiki guide|&amp;#039;&amp;#039;&amp;#039;how to copy the convert template&amp;#039;&amp;#039;&amp;#039;]] for information on copying this module and modifying it for use on another wiki.}}&lt;br /&gt;
This module converts a value from one unit of measurement to another. For example:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{convert|123|lb|kg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → 123 pounds (56 kg)&lt;br /&gt;
&lt;br /&gt;
The module is called using a template—parameters passed to the template are used by this module to control how a conversion is performed. For example, units can be abbreviated (like &amp;lt;code&amp;gt;kg&amp;lt;/code&amp;gt;), or displayed as names (like &amp;lt;code&amp;gt;kilogram&amp;lt;/code&amp;gt;), and the output value can be rounded to a specified precision. For usage information, see [[Help:Convert]].&lt;br /&gt;
&lt;br /&gt;
The template that invokes this module is:&lt;br /&gt;
*[[Template:Convert]]&lt;br /&gt;
&lt;br /&gt;
The following modules are required:&lt;br /&gt;
*[[Module:Convert]] – &amp;#039;&amp;#039;(this module)&amp;#039;&amp;#039; code to convert units&lt;br /&gt;
*[[Module:Convert/data]] – unit definitions&lt;br /&gt;
*[[Module:Convert/text]] – text messages, and parameter names and values&lt;br /&gt;
&lt;br /&gt;
The following modules are optional and are used only if required and if the module exists:&lt;br /&gt;
*[[Module:Convert/extra]] – extra (temporary) unit definitions; used if a unit is not found in [[Module:Convert/data]]&lt;br /&gt;
*[[Module:ConvertNumeric]] – code to spell an input value in words (only English is supported)&lt;br /&gt;
&lt;br /&gt;
The following help pages are available:&lt;br /&gt;
*[[Help:Convert]] – overview&lt;br /&gt;
*[[Help:Convert messages]] – describes error and warning messages; messages link to this page so it is required when the module is copied to another wiki&lt;br /&gt;
*[[Help:Convert units]] – overview of units&lt;br /&gt;
&lt;br /&gt;
A page containing a convert error is added to one of the following categories, providing the page is in a specified [[WP:Namespace|namespace]] (articles, by default):&lt;br /&gt;
*[[:Category:Convert invalid units]]&lt;br /&gt;
*[[:Category:Convert invalid options]]&lt;br /&gt;
&lt;br /&gt;
Units are defined in the wikitext of the master list of units.&lt;br /&gt;
*[[Module:Convert/documentation/conversion data/doc]] – master list of unit definitions&lt;br /&gt;
*[[Module:Convert/makeunits]] – translates wikitext from the master list to Lua&lt;br /&gt;
*[[Module talk:Convert/makeunits]] – makeunits results; copy the text to [[Module:Convert/data]]&lt;br /&gt;
&lt;br /&gt;
[[Module:Convert/data]] is transcluded into every page using the convert module, so experimenting with a new unit in that module would involve a significant overhead. The [[Module:Convert/extra]] module is an alternative which is only transcluded on pages with a unit that is not defined in the main data module.&lt;br /&gt;
&lt;br /&gt;
===Sandbox===&lt;br /&gt;
When making a change, copy the current modules to the sandbox pages, then edit the sandbox copies:&lt;br /&gt;
*[[Module:Convert/sandbox]]&lt;br /&gt;
*[[Module:Convert/data/sandbox]]&lt;br /&gt;
*[[Module:Convert/text/sandbox]]&lt;br /&gt;
*[[Module:Convert/extra/sandbox]]&lt;br /&gt;
&lt;br /&gt;
Use the following template to test the results (example &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{convert/sandbox|123|lb|kg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;):&lt;br /&gt;
*[[Template:Convert/sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Template:Convert/sandbox]] invokes [[Module:Convert/sandbox]] with parameter {{para|sandbox|on}} which causes convert to use the sandbox modules rather than the normal modules.&lt;br /&gt;
&lt;br /&gt;
The following should be used to test the results of editing the convert modules.&lt;br /&gt;
*[[Module:Convert/tester]] – module to run tests by comparing template output with fixed text&lt;br /&gt;
*[[Module:Convert/sandbox/testcases]] – templates to be tested, with expected outputs (uses the tester module)&lt;br /&gt;
*[[Module talk:Convert/sandbox/testcases]] – view test results&lt;br /&gt;
&lt;br /&gt;
It is not necessary to save the testcases page before viewing test results. For example, [[Module:Convert/sandbox/testcases]] could be edited to change the tests. While still editing that page, paste {{nowrap|&amp;quot;&amp;lt;code&amp;gt;Module talk:Convert/sandbox/testcases&amp;lt;/code&amp;gt;&amp;quot;}} (without quotes) into the page title box under &amp;quot;Preview page with this template&amp;quot;, then click &amp;quot;Show preview&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
The template that invokes this module can define options to configure the module. For example:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:convert|convert|numdot=,|numsep=.}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:Sets the [[decimal mark]] to be a comma, and the thousands separator to be a dot.&lt;br /&gt;
&lt;br /&gt;
Other options, with default values, are:&lt;br /&gt;
*&amp;lt;code&amp;gt;|maxsigfig=14&amp;lt;/code&amp;gt; – maximum number of significant figures&lt;br /&gt;
*&amp;lt;code&amp;gt;|nscat=0&amp;lt;/code&amp;gt; – [[WP:Namespace|namespaces]] (comma separated) in which an error or warning adds a category to the page&lt;br /&gt;
*&amp;lt;code&amp;gt;|warnings=0&amp;lt;/code&amp;gt; – 0 (zero) disables warnings; 1 shows important warnings; 2 shows all warnings&lt;br /&gt;
&lt;br /&gt;
An option in the template can specify that the sandbox versions of the modules be used. If specified, the text on the right-hand side of the equals sign must be the name of the subpage for each sandbox module.&lt;br /&gt;
*&amp;lt;code&amp;gt;|sandbox=sandbox&amp;lt;/code&amp;gt; – omit for normal operation&lt;br /&gt;
&lt;br /&gt;
All text used for input parameters and for output messages and categories can be customized. For example, at enwiki the option &amp;lt;code&amp;gt;|lk=on&amp;lt;/code&amp;gt; can be used to link each displayed unit to its article. The &amp;quot;&amp;lt;code&amp;gt;lk&amp;lt;/code&amp;gt;&amp;quot; and &amp;quot;&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&amp;quot; can be replaced with any desired text. In addition, input and output numbers can be formatted and can use digits in the local language. See the [[Template:Convert/Transwiki guide/translate|translation guide]] for more information.&lt;/div&gt;</summary>
		<author><name>Djehuti</name></author>
	</entry>
</feed>