Difference between revisions of "Help:Translation"

From Pathfinder Wiki
(Marked this version for translation)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Translation Interface=
+
<languages />
 +
<div style="margin-right:3em; float:left;">__TOC__</div>
 +
<translate>
 +
 
 +
=Translation Interface= <!--T:1-->
 
==Translate Extension==
 
==Translate Extension==
We are using the Translate extension to allow for easy and extensible translation of the wiki into other languages. This document is an attempt to describe a little bit of how that is done.
+
We are using the Translate extension to allow for easy and extensible translation of the wiki into other languages. This document is an attempt to describe a little bit of how that is done.
 +
 
 +
==Markup of source text== <!--T:2-->
 +
It starts by adding a <nowiki><translate></nowiki> tag (and its closing tag) to the source text. These tags can be opened and closed anywhere in the source text, but they must balance, and cannot overlap. We also add a <nowiki><languages /></nowiki> tag to the top of each page we wish to translate - that's what renders the language selection menu at the top. In most cases this markup will have already been done by the admins and you don't need to worry about it.
  
==Markup of source text==
+
== Mark for Translation == <!--T:3-->
It starts by adding a <nowiki><translate></nowiki> tag (and its closing tag) to the source text.  These tags can be opened and closed anywhere in the source text, but they must balance, and cannot overlap. We also add a <nowiki><languages /></nowiki> tag to the top of each page we wish to translate - that's what renders the language selection menu at the top. In most cases this markup will have already been done by the admins and you don't need to worry about it.
+
Once a page is saved and has the translate tags in it, it can be marked for translation. This is done by clicking the link to "Mark for translation" that will appear at the top of the page. If the page has been changed since it was last marked, the message will be slightly different: "Translate this page; This page has changes since it was last marked for translation."
  
== Mark for Translation ==
+
<!--T:8-->
Once a page is saved and has the translate tags in it, it can be marked for translation.  This is done by clicking the link to "Mark for translation" that will appear at the top of the page.  Clicking it will make the software divide the page into "translation units" - each of which is identified with a <nowiki><--T:''n''--></nowiki> tag, where ''n'' is a number. These should not be deleted from the source text. The page it shows after to "marks" the page will show how it wants to define these translation units, and in general it is OK to just accept what it suggests.
+
Clicking it will make the software divide the page into "translation units" - each of which is identified with a <nowiki><--</nowiki>T:''n''<nowiki>--></nowiki> tag, where ''n'' is a number. These should not be deleted from the source text. The page it shows after it "marks" the page will show how it wants to define these translation units, and in general it is OK to just accept what it suggests.
  
You may or may not want to translate the page title (which is an option it will offer). If it's a template, there is no need to translate the page name. For regular content, it is a good idea to leave that option checked, as this is always the safest thing to do. If it turns out we didn't need to translate the page title, we can just not translate it. If you ''know'' we won't need the page title translated, it's better to uncheck the box so that translators are not burdened with yet-another-task.
+
<!--T:4-->
 +
You may or may not want to translate the page title (which is an option it will offer). If it's a template, there is no need to translate the page name. For regular content, it is a good idea to leave that option checked, as this is always the safest thing to do. If it turns out we didn't need to translate the page title, we can just not translate it. If you ''know'' we won't need the page title translated, it's better to uncheck the box so that translators are not burdened with yet-another-task.
  
Finally, you must press the button at the bottom of the page to accept its suggestions and your selections. Doing this will make it churn for a bit, and I've found that it's a Bad Idea to try to get it to do this on more than one page at a time, as it tends to throw database errors. So... just wait for it.
+
<!--T:5-->
 +
Finally, you must press the button at the bottom of the page to accept its suggestions and your selections. Doing this will make it churn for a bit, and I've found that it's a Bad Idea to try to get it to do this on more than one page at a time, as it tends to throw database errors. So... just wait for it.
  
==Translating==
+
==Translating== <!--T:6-->
Once the page has been marked, you can return to it, and instead of saying "Mark for translation" it will say "translate". Click that, and it will take you to the translation interface (finally!)
+
Once the page has been marked, you can return to it, and instead of saying "Mark for translation" it will say "translate". Click that, and it will take you to the translation interface (finally!)
The first thing you will need to do is select a language. Once that's done, it will lead you through each translation unit.
+
The first thing you will need to do is select a language. Once that's done, it will lead you through each translation unit.
 
===Translation units===
 
===Translation units===
Translation units are just chunks of text that are translated independently of everything else. Each unit is saved in its own page, but wiki magic is used to make it look like all those pages are just one page. The advantage of keeping each translation unit independent is that paragraphs in the source text can be rearranged and deleted, and the translated text will automatically adapt.
+
Translation units are just chunks of text that are translated independently of everything else. Each unit is saved in its own page, but wiki magic is used to make it look like all those pages are just one page. The advantage of keeping each translation unit independent is that paragraphs in the source text can be rearranged and deleted, and the translated text will automatically adapt.
 +
 
 +
==Adding a language== <!--T:9-->
 +
If you want to translate to a language you do not see available, you will have to add it. Follow [[Help:Adding_a_Language|THIS LINK]] to learn how to add a language not already present to this Wiki.
 +
 
 +
=OK? Do it!= <!--T:7-->
 +
If you want more details, it's a good idea to search the internet. Maybe starting [https://www.mediawiki.org/wiki/Extension:Translate here]. Also feel free to ask questions in any of the discussion pages on the wiki.
  
==OK? Do it!==
+
</translate>
If you want more details, it's a good idea to search the internet.  Maybe starting [https://www.mediawiki.org/wiki/Extension:Translate here].  Also feel free to ask questions in any of the discussion pages on the wiki.
 

Latest revision as of 21:39, 27 January 2022

Other languages:
Deutsch • ‎English

Translation Interface

Translate Extension

We are using the Translate extension to allow for easy and extensible translation of the wiki into other languages. This document is an attempt to describe a little bit of how that is done.

Markup of source text

It starts by adding a <translate> tag (and its closing tag) to the source text. These tags can be opened and closed anywhere in the source text, but they must balance, and cannot overlap. We also add a <languages /> tag to the top of each page we wish to translate - that's what renders the language selection menu at the top. In most cases this markup will have already been done by the admins and you don't need to worry about it.

Mark for Translation

Once a page is saved and has the translate tags in it, it can be marked for translation. This is done by clicking the link to "Mark for translation" that will appear at the top of the page. If the page has been changed since it was last marked, the message will be slightly different: "Translate this page; This page has changes since it was last marked for translation."

Clicking it will make the software divide the page into "translation units" - each of which is identified with a <--T:n--> tag, where n is a number. These should not be deleted from the source text. The page it shows after it "marks" the page will show how it wants to define these translation units, and in general it is OK to just accept what it suggests.

You may or may not want to translate the page title (which is an option it will offer). If it's a template, there is no need to translate the page name. For regular content, it is a good idea to leave that option checked, as this is always the safest thing to do. If it turns out we didn't need to translate the page title, we can just not translate it. If you know we won't need the page title translated, it's better to uncheck the box so that translators are not burdened with yet-another-task.

Finally, you must press the button at the bottom of the page to accept its suggestions and your selections. Doing this will make it churn for a bit, and I've found that it's a Bad Idea to try to get it to do this on more than one page at a time, as it tends to throw database errors. So... just wait for it.

Translating

Once the page has been marked, you can return to it, and instead of saying "Mark for translation" it will say "translate". Click that, and it will take you to the translation interface (finally!) The first thing you will need to do is select a language. Once that's done, it will lead you through each translation unit.

Translation units

Translation units are just chunks of text that are translated independently of everything else. Each unit is saved in its own page, but wiki magic is used to make it look like all those pages are just one page. The advantage of keeping each translation unit independent is that paragraphs in the source text can be rearranged and deleted, and the translated text will automatically adapt.

Adding a language

If you want to translate to a language you do not see available, you will have to add it. Follow THIS LINK to learn how to add a language not already present to this Wiki.

OK? Do it!

If you want more details, it's a good idea to search the internet. Maybe starting here. Also feel free to ask questions in any of the discussion pages on the wiki.