ਫਰਮਾ:Convert/Transwiki guide/translateThis page explains how the convert template and module can be adapted for use at any Wikipedia. It is likely that some details will need further explanation—please ask at Module talk:Convert for assistance. For an overview of how the template is used, see Help:Convert. Overview
Copying the above is sufficient for convert to work, but more is needed to translate unit names (see below). When translations to unit names and convert options are performed, it would be desirable to keep the enwiki text so that if an article is copied from enwiki, any converts would work. For example, the unit code Nothing in Module:Convert needs to be changed. The module contains some messages that would only appear if a bug were introduced to the program. It is best to not translate those messages so updates will be easier in the future. The bug messages have never been displayed and would be meaningless to general editors even if translated. Module:Convert/data must not be changed because it is generated by running a script which reads the data from a master list of units. See below. The messages in Module:Convert/text should be translated. Convert/textThe following items are in Module:Convert/text. It is not necessary to translate all items because some features will probably not be used. If they are used, translations can be added later.
At enwiki, the "adjectival" options (
In ["mid"] = "opt_adj_mid", -- adj=on with user-specified text after input unit (between input and output)
["on"] = "", -- disable hyphenation
Unit namesIn an article using the convert template, one of the following options can be entered in the template.
If needed, one of the following options can be added to Template:Convert to change how
Unit definitionsUnits are defined in a table which can be at any page. At enwiki, these pages are used:
The program is run by clicking "purge" at Module talk:Convert/makeunits. That talk page contains:
At enwiki, the title of the master list of units was chosen to be a "doc" page in the module namespace. The "doc" should be replaced with the local name. The "documentation" part was used for a trick to prevent display of the "This is the module documentation" message—see MediaWiki:Scribunto-doc-page-header. Redundant information can be omitted from the master list. For example, if a unit has the same singular and plural name (or if plural names are not used), the plural name can be omitted. It is likely that US unit names are only useful at enwiki, so they can all be empty. Redundant information does not have to be omitted—makeunits omits anything it considers is not needed. Before makeunits can be successfully used, Convert/text has to be correctly configured. Ask for assistance. Hundreds of unused units are defined at enwiki. In addition, there are many entries for default exceptions and link exceptions that are probably only useful at enwiki. To simplify working with the units, many rarely or never-used items could be removed. If a removed item is needed in the future, it can be re-added. At enwiki, Module:Convert/documentation/conversion data/doc transcludes Module:Convert/documentation/conversion data introduction/doc to show some explanations at the top. Rather than copying and translating that technical documentation, it may be better to use a short message as in the following example. Example of an introductionFollowing is the master list of conversion data used by Module:Convert. This page is read by a script (makeunits). The script extracts information from the wikitext, and outputs text that can be copied into Module:Convert/data. Information about the format of tables used on this page is available at enwiki. Making unitsWhen adding new units, it may be better to add them to Module:Convert/extra as it involves very little risk—even if the "extra" module is damaged, converts should still function. By contrast, a mistaken edit in Module:Convert/data could break all converts, and that may not be immediately apparent—you would need to purge a page with a convert template to test if it still works. The procedure to change an existing unit is:
A sandbox should be used to preview some convert templates to check that they still work. The changes will be immediately available, but a page using the convert template may need to be purged to see the effect. Help:Convert messagesWhen there is a problem with a convert, the module outputs a message to alert editors. Extra information is shown on mouseover (pop-up text appears when the mouse is held above the error message). The message links to Help:Convert messages—that page should be copied and translated. As explained above, a simple way to get started would be to link to the enwiki page; translation could occur later. To demonstrate all possible messages, another template is needed, namely Template:Convert/warning which has |
Portal di Ensiklopedia Dunia