1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Wiki block templates i18n

Discussion in 'Forum, wiki and other THD pages' started by JacKD, Dec 5, 2011.

Mods: dnmr, Kazaco97
  1. JacKD

    JacKD Ballista Bolt Thrower

    Messages:
    496
    Hi,

    I was translating the english articles on the wiki to spanish, and I had a problem with the templates being used for the block tables (http://kagwiki.com/wiki/Blocks)

    Here's the code for the table:

    Code:
    {| class="wikitableShiny" border="1"
    ! Image
    ! Block name
    ! One block yields
    ! Hits to mine
    {{Bedrock|Blocks}}
    {{Dirt|Blocks}}
    {{Gold Nugget|Blocks}}
    {{Rock|Blocks}}
    {{Thick Rock|Blocks}}
    {{Tree|Blocks}}
    |}
    Each line (for example, {{Bedrock|Block}}) uses a template defined as following:

    Code:
    {{{{{1}}}|{{{2}}}
    |Name=Bedrock
    |Full image=[[File:Bedrockblock1.png]] [[File:Bedrockblock2.png]] [[File:Bedrockblock3.png]] [[File:Bedrockblock4.png]] [[File:Bedrockblock5.png]] [[File:Bedrockblock6.png]] [[File:Bedrockblock7.png]]
    |Part image=[[File:Bedrockblock7.png]]
    |Hits=Can only be mined with [[Bomb|bombs]]
    |Yields=Nothing
    }}<noinclude>[[Category:Data]]</noinclude>
    
    The problem I have is with the "Name" field, as I can't get it to display the name in spanish with a link to a page with a different name. It should be something like Name=[[Bedrock/es|Lecho de roca]] but when I do it like that I get an extra pair of [[ ]] on the name :( I've tried other stuff and I get different errors like Bedrock/es and stuff.

    Does anyone knows how can I solve this? The easy way would be to use a template named "Lecho de roca" instead of following the convetion "Page_name/2letterisocode" but then again, that breaks the convention.

    Any ideas?
     
  2. Labla

    Labla Shopkeep Stealer

    Messages:
    36
    To be honest I don't think that translating KAG wiki at this point is good idea. First of all even english version has sparse amount of information, some is outdated. We are lacking men power to work on english version of wiki, not speaking about translated versions which in most cases are even more outdated.

    I even thought about internationalization of templates. But in the end I've strong feeling about keeping articles in multiple languages in one wiki: it is fucked up idea. Just as example, even Mediawiki.org isn't coherent when it comes to naming convention - for some things they are using "English_name/language" for other "Name_in_specific_language".

    As for your question:

    Code:
    |Name=Bedrock/es{{!}}Lecho de roca
    should work. "|" is treated as pipe in template, {{!}} is used as hack to avoid this.

    UPDATE: I changed Template:Bedrock/es and it seems that it works.

    Just one more thing from me. Please move translated data templates out of category Data to something like category Data/es.
     
  3. JacKD

    JacKD Ballista Bolt Thrower

    Messages:
    496
    Thanks, that solves it!

    And yeah, I know everything is changing and stuff, but at some point in time we'll have to translate stuff and I think it's better to do it in small step rather than trying to do everything in one go. I do work in the english wiki form time to time, just not recently. In the end, I just like to have info available in my own language and it keeps me entertained when I have nothing else to do hahaha.
     
    Noburu and illu like this.
Mods: dnmr, Kazaco97