Difference between revisions of "Help:Infoboxes"

From Cantr II Wiki
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{InterwikiLink:HelpInfoboxes}}
 +
 
This article tries to explain and give examples of how to use the new Infobox structure on the Cantr wiki, and also how to translate these templates into other languages.
 
This article tries to explain and give examples of how to use the new Infobox structure on the Cantr wiki, and also how to translate these templates into other languages.
  
Line 39: Line 41:
 
For categories the name is prepended with Category, so for e.g. [[:Category:Tools]] the interwiki template would be [[Template:InterwikiLink:CategoryTools]].
 
For categories the name is prepended with Category, so for e.g. [[:Category:Tools]] the interwiki template would be [[Template:InterwikiLink:CategoryTools]].
  
§A includes the master template Interwiki, with all formatting and definitions of what the template should do. More about that in some later post. §B is the English article; [b]Silver fork[/b] has to exactly match the article name. §C following the English original article are language code and article name for any (all!?) translated articles. These are prweferrably ordered alphabetically for ease of reference.
+
§A includes the master template Interwiki, with all formatting and definitions of what the template should do. More about that in some later post. §B is the English article; Silver fork has to exactly match the article name. §C Following the English original article are language code and article name for any translated articles. These are preferably ordered alphabetically for ease of reference.
  
 
§2 : ST stands for [[Help:Infoboxes#Stacked Templates|Stacked Template]]. Having this is very helpful when (as in this case) an article have multiple info-boxes. It will make them line up to the left of the article text.
 
§2 : ST stands for [[Help:Infoboxes#Stacked Templates|Stacked Template]]. Having this is very helpful when (as in this case) an article have multiple info-boxes. It will make them line up to the left of the article text.
  
§3 : Infobox:Manufacture is a template that is specialized for handling items that are manufactured in game. More about all possible parameters in a later post. I guess most of the ones in this example is rather self explanatory. Leaving a parameter without a value is ok, if you don't know it's value. It will cause the article to be included in the Incomplete category, where someone is likely to pick it up and fix it.
+
§3 : Infobox:Manufacture is a template that is specialized for handling items that are manufactured in game. More about all possible parameters in a later post. I guess most of the ones in this example are rather self explanatory. Leaving a parameter without a value is ok, if you don't know it's value. It will cause the article to be included in the Incomplete category, where someone is likely to pick it up and fix it.
  
 
§4 : This is the end of the Infobox:Manufacture template. All templates begin with <nowiki>{{ and end with }}</nowiki>.
 
§4 : This is the end of the Infobox:Manufacture template. All templates begin with <nowiki>{{ and end with }}</nowiki>.
Line 93: Line 95:
 
Now you need to translate the contents of the template. What you need to translate is the following:
 
Now you need to translate the contents of the template. What you need to translate is the following:
 
* Headers visible in the infobox, e.g. ''Manufacturable item'', ''Skill used'', ''Resources''.
 
* Headers visible in the infobox, e.g. ''Manufacturable item'', ''Skill used'', ''Resources''.
* Keywords, e.g. ''type'', ''time'', ''resources'', ''rot''
+
* Keywords, e.g. ''type'', ''time'', ''resources'', ''rot'' (* optional, if wiki editors in this language know basic English)
 
* Included categories. All categories '''must''' be translated into categories in the target language.
 
* Included categories. All categories '''must''' be translated into categories in the target language.
 
* The <nowiki>{{Doc}}</nowiki> tag, should be changed into a translated tag, e.g. <nowiki>{{Doc (Pl)}}</nowiki>
 
* The <nowiki>{{Doc}}</nowiki> tag, should be changed into a translated tag, e.g. <nowiki>{{Doc (Pl)}}</nowiki>

Latest revision as of 13:29, 5 November 2012

Interwiki

българскиDeutschEnglishEspañolEsperantoFrançaisItalianoLietuviųLojbanNederlandsPolskaPortuguêsРусскийSuomiSvenskaTürkçe中文

This article tries to explain and give examples of how to use the new Infobox structure on the Cantr wiki, and also how to translate these templates into other languages.

Introduction to Infoboxes and Templates

The goal is for every item in game to have a corresponding article in the wiki, using the same syntax and looks for conformity. The current recommended article layout is something like the following. I'm using silver fork as an example, and everything after a § is a comment, only for this example.

 {{InterwikiLink:SilverFork}} §1
 {{ST|stack={{Infobox:Manufacture §2 §3
 | type      = Semi-finished products
 | skill     =
 | resources = 30 [[gram]]s of [[silver]]
 | tools     = {{hammer}}
 | rot       =
 | userot    =
 | repair    =
 }} §4
 {{Infobox:Holdable §5
 | attack      =
 | skillweight =
 | weight      = 30
 | visible     = yes
 }}}}§6

 The [[silver fork]] is has no real use in game, except for being used in roleplay. §7

 §8
 

§1 : The first thing in the article is the Interwiki template reference. In this case the line {{InterwikiLink:SilverFork}} will include Template:InterwikiLink:SilverFork into the article as it is viewed. (NOTE: The names for Interwiki-templates are without whitespace and every word capitalized). The template file looks like this:

 {{Interwiki  §A
 | en  = Silver fork §B
 | sv  = Silvergaffel §C
 }}
 

For categories the name is prepended with Category, so for e.g. Category:Tools the interwiki template would be Template:InterwikiLink:CategoryTools.

§A includes the master template Interwiki, with all formatting and definitions of what the template should do. More about that in some later post. §B is the English article; Silver fork has to exactly match the article name. §C Following the English original article are language code and article name for any translated articles. These are preferably ordered alphabetically for ease of reference.

§2 : ST stands for Stacked Template. Having this is very helpful when (as in this case) an article have multiple info-boxes. It will make them line up to the left of the article text.

§3 : Infobox:Manufacture is a template that is specialized for handling items that are manufactured in game. More about all possible parameters in a later post. I guess most of the ones in this example are rather self explanatory. Leaving a parameter without a value is ok, if you don't know it's value. It will cause the article to be included in the Incomplete category, where someone is likely to pick it up and fix it.

§4 : This is the end of the Infobox:Manufacture template. All templates begin with {{ and end with }}.

§5 : The Infobox:Holdable template is used for anything that can be carried by a character.

§6 : This is the end tags for both Infobox:Holdable and ST.

§7 : This is the main text of the article. As much as possible, any noun or category-reference and such should be linked with [[whatever]].

§8 : Usually in a wiki here goes various Category statements, to include this article in various categories. This is not needed now (in most cases), because our templates handle that for us.

Stacking Infoboxes

Infoboxes should be stacked to the left in the article. This is done by using the ST template. Here is an example:

 {{ST|stack={{Infobox:Manufacture
 | type     = Tools
 | skill    = Manufacturing tools
 ...
 }}
 {{Infobox:Holdable
 | weight   = 500
 ...
 }} }}
 

Note that this is only guaranteed to work with new templates. The ST template doesn't have to be translated to other languages, it works as is with every language.

Translating Infoboxes

Here are a few steps to follow when you want to create these Infoboxes in other languages.

Create categories

The following categories should be created in the target language, and the content of the English (or other preferred source language) copied and translated to it:

They should also be added to the Interwiki system (as should all articles):

What to translate

Copy the contents of the source language version of your infobox into an article with the name translated into the target language. E.g. edit Template:Infobox:Manufacture and copy the contents from it. Create a new article named E.g. Template:Infobox:Fabricación and paste the original contents into it.

Now you need to translate the contents of the template. What you need to translate is the following:

  • Headers visible in the infobox, e.g. Manufacturable item, Skill used, Resources.
  • Keywords, e.g. type, time, resources, rot (* optional, if wiki editors in this language know basic English)
  • Included categories. All categories must be translated into categories in the target language.
  • The {{Doc}} tag, should be changed into a translated tag, e.g. {{Doc (Pl)}}
  • Create and translate the documentation for the template, e.g. Template:Infobox:Manufacture/Doc. This is easiest to do after the Infobox has been created, as you will see on that page where the Doc will go (a missing link). Copy the documentation from the original language and translate it, with your new keywords.

This can seem like a huge job at first, but after you have done one or two, it's not that bad. ;)