Vintage Story Wiki:How to translate the wiki: Difference between revisions

From Vintage Story Wiki
Marked this version for translation
m (typo fix)
(Marked this version for translation)
Line 2: Line 2:


<translate>
<translate>
== Principles for translation ==
== Principles for translation == <!--T:15-->


<!--T:16-->
* Is the page going to get major changes in the future? If so, maybe finish writing it before you tag it for translation.
* Is the page going to get major changes in the future? If so, maybe finish writing it before you tag it for translation.
* If the content inside the <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> doesn't need to be translated, ''don't put it inside the tags''. Better to have multiple sets of translation tags than one massive one that creates future problems.
* If the content inside the <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> doesn't need to be translated, ''don't put it inside the tags''. Better to have multiple sets of translation tags than one massive one that creates future problems.
Line 9: Line 10:
* Make use of our templates for translatable content:
* Make use of our templates for translatable content:
</translate>
</translate>
*: {{ll|Template:Page language link|2=<translate>Template:Page language link</translate>}}
*: {{ll|Template:Page language link|2=<translate><!--T:17--> Template:Page language link</translate>}}
*: {{ll|Template:Localized link|2=<translate>Template:Localized link</translate>}}
*: {{ll|Template:Localized link|2=<translate><!--T:18--> Template:Localized link</translate>}}
*: {{ll|Template:Translatable template|2=<translate>Template:Translatable template</translate>}}
*: {{ll|Template:Translatable template|2=<translate><!--T:19--> Template:Translatable template</translate>}}
<translate>
<translate>
=== How to mark for translation === <!--T:1-->
=== How to mark for translation === <!--T:1-->
Line 26: Line 27:
# Go to the [[Special:Translate|translation center]] and start thunder typing ;-)
# Go to the [[Special:Translate|translation center]] and start thunder typing ;-)


<!--T:20-->
For tackling specific formatting issues in wikitext and how they interact with the translate tags, see [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples this guide on MediaWiki]. When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags.
For tackling specific formatting issues in wikitext and how they interact with the translate tags, see [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples this guide on MediaWiki]. When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags.


Line 70: Line 72:
Templates should only be tagged and mark for translation when they are ''complete''. Make sure the <code><nowiki><languages /></nowiki></code> tag is '''outside''' of the part of the template marked for transclusion, i.e. the <code><nowiki><onlyinclude> ... </onlyinclude></nowiki></code> or <code><nowiki><includeonly> ... </includeonly></nowiki></code> part.
Templates should only be tagged and mark for translation when they are ''complete''. Make sure the <code><nowiki><languages /></nowiki></code> tag is '''outside''' of the part of the template marked for transclusion, i.e. the <code><nowiki><onlyinclude> ... </onlyinclude></nowiki></code> or <code><nowiki><includeonly> ... </includeonly></nowiki></code> part.


<!--T:21-->
When you use a translated or translatable (i.e. tagged and marked for translation) template on any page, you '''must''' use the [[Template:Translatable template|Translatable template]] template instead! For example, if you wanted to use the <code><nowiki>{{Metals navbox}}</nowiki></code> template on a page, instead write it as <code><nowiki>{{Translatable template|Metals navbox}}</nowiki></code>. You can also use <code><nowiki>{{tnt|Metals navbox}}</nowiki></code> as a shorter version.
When you use a translated or translatable (i.e. tagged and marked for translation) template on any page, you '''must''' use the [[Template:Translatable template|Translatable template]] template instead! For example, if you wanted to use the <code><nowiki>{{Metals navbox}}</nowiki></code> template on a page, instead write it as <code><nowiki>{{Translatable template|Metals navbox}}</nowiki></code>. You can also use <code><nowiki>{{tnt|Metals navbox}}</nowiki></code> as a shorter version.


<!--T:22-->
When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags. (I'm repeating this because it's important.)
When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags. (I'm repeating this because it's important.)


== Translating categories ==
== Translating categories == <!--T:23-->


<!--T:24-->
Categories can also be translated, and if done correctly will automatically put translated pages in their relevant language code subpage.
Categories can also be translated, and if done correctly will automatically put translated pages in their relevant language code subpage.


=== Translating a Category page ===
=== Translating a Category page === <!--T:25-->


<!--T:26-->
You can tag a Category page for translation in the same way as any other page, by adding <code><nowiki><languages/></nowiki></code> for the language selector bar then adding a set of <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> tags. The translate tags must be present even if there is no content in the Category page. [https://wiki.vintagestory.at/index.php?title=Category%3AItems&type=revision&diff=43848&oldid=28218 See this diff] as an example of what to add to an empty Category page.
You can tag a Category page for translation in the same way as any other page, by adding <code><nowiki><languages/></nowiki></code> for the language selector bar then adding a set of <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> tags. The translate tags must be present even if there is no content in the Category page. [https://wiki.vintagestory.at/index.php?title=Category%3AItems&type=revision&diff=43848&oldid=28218 See this diff] as an example of what to add to an empty Category page.


=== Translation-aware category tags ===
=== Translation-aware category tags === <!--T:27-->


<!--T:28-->
On the article that should be included in the translatable category, change the Category tags so that they read:
On the article that should be included in the translatable category, change the Category tags so that they read:


<!--T:29-->
<code><nowiki>[[Category:CategoryName{{#translation:}}]]</nowiki></code>
<code><nowiki>[[Category:CategoryName{{#translation:}}]]</nowiki></code>


<!--T:30-->
For example, <code><nowiki>[[Category:Metals]]</nowiki></code> should become <code><nowiki>[[Category:Metals{{#translation:}}]]</nowiki></code>.
For example, <code><nowiki>[[Category:Metals]]</nowiki></code> should become <code><nowiki>[[Category:Metals{{#translation:}}]]</nowiki></code>.


<!--T:31-->
Then save and re-mark the page for translation to update the page across all languages.
Then save and re-mark the page for translation to update the page across all languages.


Confirmedusers, editor
2,831

edits