Template:Related

From translatewiki.net
Revision as of 19:41, 6 July 2022 by Verdy p (talk | contribs) (all these are the same in Template:Identical which were added incrementally, and reviewed many times)
Jump to navigation Jump to search
Test Template Info-Icon - Version (2).svg
The documentation of this template is included from its /doc subpage. [Edit]

Documentation

...

This template is meant to function as a primitive manual version of Translation Memory, until such time that an automatic tool exists.

How to use this template

This template is to be used on the documentation subpage (/qqq) of related messages, which is rendered on the right pane of the translate UI (or at top of page when editing them with the wikicode editor).

This template uses only one parameter, {{{1}}}. That parameter is the name of a subpage of this template, which contains links to the messages in question.

For an example of how it used, see MediaWiki:Protectedpagemovewarning/qqq and MediaWiki:Semiprotectedpagewarning/qqq, where it transcludes the page Template:Related/Semiprotectedpagewarning. The individual messages are listed in the "Identical/*" template, as list items using formatting templates (listed in Category:Message link templates and based on {{Msg-meta}}), one for each translation project supported on translatewiki.net, with just a single parameter for the message identifier, they should be grouped by translation project and sorted by message identifier (to avoid duplicates references to the same message and simplify their use and maintenance).

The subtemplates referenced by this template should be listed in its attached Category:Related message templates. For the full list of subtemplates (including redirects for aliases and known synonyms), see Special:PrefixIndex/Template:Related/.

Implementation notes

When added with AJAX, call $( '.mw-related-title' ).makeCollapsible(); after it is added to the document to make it work.

In other cases (on the Template:Related/… page and on the MediaWiki:…/qqq page) it works by default when the page is loaded.

See also