Help:Translating

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

Anyone who writes both English and a foreign language can help the community out by translating documentation on the wiki.

Note that all articles must be written in English before being translated into other languages.

MediaWiki's Translate extension is used to help with translating pages on the Gentoo Wiki into other languages. It uses a gettext-style message system that breaks up an article into small chunks of text that are easily translatable.

Note
There are specific instructions for translating the handbook.

Becoming a translator

Anyone willing and able to help out with translating the documentation is welcome to do so. Start out by requesting a translator account - this is relatively straightforward: for languages that are already translated, simply add an entry on the translator accounts requests page, using a standard wiki account, and wait for a response.

To translate articles for a new language, please start by translating this help page in user space. Go to the user page for the account requesting to become a translator, and in the URL bar, add a slash and the name of the new page, as such: "/User:Larry/Translating_Esperanto". Click the "create this page" link, and publish the new translation there. When requesting a translator account, link to the new translation.

There are currently translators for the following languages:

  • Catalan‎ (català)
  • Chinese (中文)
  • Croatian (hrvatski)
  • Czech (Český jazyk)
  • Dutch (Nederlands)
  • French (Français)
  • German (deutsch)
  • Greek (ελληνικά)
  • Italian (italiano)
  • Korean (한국어)
  • Indonesian (Bahasa Indonesia)
  • Japanese (日本語)
  • Persian (فارسی)
  • Polish (polski)
  • Portuguese (português)
  • Portuguese (português do Brasil)
  • Russian (русский)
  • Spanish (español)
  • Serbian (српски)
  • Ukranian (українська)
  • Turkish (Türkçe)

For all editors

Translation tags

"Translation tags" are snippets of text that automatically get added to appropriate elements of a page by the Translate extension, each time a page is marked for translation. These tags take the form <--T: 15--> and pertain to the internal workings of the extension. They are not for use by editors.

Do not create or edit these tags. If a paragraph is to be modified, just modify the content and leave the tags in place. When completely deleting a paragraph, delete its translation tag at the same time. When moving the paragraph within the page, keep the tag with the content.

When adding new paragraphs to a page, do not "hand craft" translation tags, just add the content without translation tags. Modifications to the article will have it show up in the Page translation list, and from there changes be reviewed and the page can be marked for translation again, which will add translation tags to the new sections.

Tip
For long sections of output in block level layout elements, such as FileBoxes or CodeBoxes, whitespace may be added to any empty lines so that the entire output will be treated as a unique translatable section. Otherwise each section separated by an empty line would be split into separate paragraphs, each with an individual translation tag.

Tagging translatable sections

Before a page can be translated, tag the translatable sections. In most cases, that is the whole article.

To tag a section as translatable, put it into <translate> XML tags, like this:

CODE Tagging an article to be translated
&lt;translate&gt;
We are using the [https://translatewiki.net/wiki/Translating:Page_translation_feature TranslateWiki Page translation] features to help translating pages on the Gentoo Wiki into other languages.
It uses a gettext-style message system that breaks up an article into small chunks of text that are easily translatable.
&lt;/translate&gt;

Also, add the language selection bar at the top of the article, using the <languages /> tag:

CODE Adding the language selection bar
&lt;languages /&gt;
&lt;translate&gt;
We are using the [https://translatewiki.net/wiki/Translating:Page_translation_feature TranslateWiki Page translation] features to help translating pages on the Gentoo Wiki into other languages.
It uses a gettext-style message system that breaks up an article into small chunks of text that are easily translatable.
&lt;/translate&gt;

Use the correct link style so that translations work

All internal links should be represented by {{Link}} template:

Old-style, obsolete links:

CODE Changing links to use {{Link}}
Visit the [[Main Page]]

How to make a correct link:

CODE Changing links to use {{Link}}
Visit the {{Link|Main Page}}

The link template may also accept a label to show as text in place of the actual page name. Original:

CODE Changing links to use {{Link}}
[[Help:Translating|help on translating]]

Modified:

CODE Changing links to use {{Link}}
{{Link|Help:Translating|help on translating}}

Links to sections, that used square bracket links should also use the link template instead:

CODE Changing links to use {{Link}}
Visit the [[Portage#Usage|using Portage]]
CODE Changing links to use {{Link}}
Visit the {{Link|Portage|section=#Usage|using Portage}}

This allows for direction to the translated page if it exists or the main article if it does not. This is dynamic as new pages are created with less work after translations are completed.

Additionally, sections should be tagged like {{Anchor|{section name in English}}} so any hash references are equal between languages. These are NOT to be translated on subsequent languages. An alternative name for the anchor may also be used in place of the section name, particularly in abnormally long or those with non-alpha characters. When using an alternative name, the Link section must point to this Anchor.

Once an article has reached completion, issue a translation request for translation to be enabled.

Requesting page translation

After the previous steps (adding the "languages" and "translate" tags), the page will automatically be listed in the Page translation page. An administrator or lead translator will check the article quality and approve the request by marking a page for translation, or deny the request if the article needs more work before going on to translation. Make sure to follow the discussion page as this will be used to discuss the reason why a request was denied.

Articles that that have pending changes that need marking to allow their translation will have the text "this page contains changes which are not marked for translation" at the top.

For administrators the text will read "this page has changes since it was last marked for translation" and the "marked for translation" part of that text is a link that can be clicked to start the process of marking the page for translation.

For Translators: Translating

Important
Before starting translation work, consider if an article has changes that are not marked for translation. If at the top of an article it says "this page contains changes which are not marked for translation", (or "this page has changes since it was last marked for translation"), then only an "outdated" version will be available for translation. Contact an admin or lead-translator to request that an article be reviewed and marked for translation.

To start translating an article, click the Translate this page link below the page title. On the next page, select the language in the upper right corner.

This will show a table of translatable paragraphs. Click on the links in the leftmost column to show an input box for translation. After finishing a paragraph, click Skip to next translation. To finish, click Save translation.

Those who are promoted to a lead translator, also have access to translate messages for templates.

Special templates

These templates are translated:


These templates do not need to be changed, they automatically display translated strings. Do change the specific text in a page. Do not add a language suffix to the template name.

If a language is missing, or to suggest new Templates to become translatable, contact the wiki project.

Language code exceptions

For some scripts, there is no usable ISO 639-1 code. These exceptions are used instead:

Replacement code Language
zh-cn Simplified Chinese (简体中文)

Language Statistics

A list of pages not completely translated can be found by filling in a language code at Special:LanguageStats.