Template:Translation/doc

From Wikimania
Jump to navigation Jump to search

Usage

Add translations

To add a new translation, copy a line for your new translation in the template. This should be in the form |langcode |status, where "langcode" is the ISO 639-3 language code (search), and "status" is the status of the translation (either "missing", "progress", "proofreading", "updating", or "published").

For example, if you wanted to add the English translation, you'd add "|en |missing".

Create a new template

Create a new page called "Template:Translation/Page name" (where Page name is the name of the page with translations). Place the following example code:

{{translation
 |ar  |missing
 |br  |missing
 |de  |missing
 |en  |published
 |es  |missing
 |fr  |missing
 |hu  |missing
 |ja  |missing
 |ko  |missing
 |nl  |missing
 |pl  |missing
 |pt  |missing
 |ru  |missing
 |sv  |missing
 |zh-hans |missing
 |zh-hant |missing

 |page  ={{subst:#titleparts:{{subst:FULLPAGENAME}}|1|2}}
 |source={{subst:#titleparts:{{subst:FULLPAGENAME}}|1|2}}

 <!--optional-->
 |destination   = [[{{subst:#titleparts:{{subst:FULLPAGENAME}}|1|2}}]]
 |source update = 
 |source revid  = {{{1|}}}
}}

Every first parameter is a language code (search); every second parameter is that translation's status (missing, progress, proofreading, updating, or published). You can add new translations simply by adding new lines (up to 55 translations).

Special parameters:

  • "page" is the base name of the page being translated (the above code will fill it automatically if the template is named correctly).
  • "source" is the original page being translated; the edit links will place the code of that page when adding a new translation.
  • Optional parameters (first two are primarily given by the translation requester, usually translation subcommittee and the last one may be given by the initiator of each translation):
    • "destination" is a link to the final page in the original (when translating for protected wikis or namespaces).
    • "source update" is the date the source page was significantly updated (requiring updates to translations). Any standard date format will be recognized.
    • "source revid" is the revision ID used to make the translation. This should be left as shown above, and filled in on individual pages as shown below.

Place the template

{{translation/Page name}}

Once the above template is created, simply place the example above on translation pages. Replace Page name with the correct name, as created above.

Coding

Subtemplates
https://wikimania2009.wikimedia.org/wiki/Template:Translation/doc
wikimania2009.wikimedia.org
crawl=CC-MAIN-2019-51
24874
application/http; msgtype=response
sha1:2CXR64I7FIC5TUDWC43NAUNY4CVKKUOC
<urn:uuid:d116a417-ab41-4280-b8e9-f47d51fdd32f>
2019-12-11T08:07:56Z
208.80.154.224
text/html
sha1:EQJU52GJDJADSJZXDK5ILKI6DPH66TRP
<urn:uuid:592dc221-707c-470e-9c17-f3e3cc5b2f51>
https://wikimania2009.wikimedia.org/wiki/Template:Translation/doc
response
<urn:uuid:47696899-d371-4eac-8552-eb35c66143b8>
isPartOf: CC-MAIN-2019-51
publisher: Common Crawl
description: Wide crawl of the web for December 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-37.ec2.internal
software: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/