Difference between revisions of "Help:Translation"

From Pathfinder Wiki
Line 1: Line 1:
 
<languages /><translate>
 
<languages /><translate>
 +
 
=Translation Interface=
 
=Translation Interface=
 
==Translate Extension==
 
==Translate Extension==

Revision as of 14:05, 1 January 2021

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. 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 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.

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.

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.