Help:Translating
Contributor's guide — Guidelines — Fixing errors howto
Editing pages — Talk pages — Formatting
Code of conduct — About Gentoo wiki — Wiki FAQ
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.
There are specific instructions for translating the handbook.
For Editors: Marking translatable sections
Before a page can be translated, mark the translatable sections. In most cases, that is the whole article.
To mark a section as translatable, put it into <translate>
XML tags, like this:
<translate>
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.
</translate>
Also, add the language selection bar at the top of the article, using the <languages />
tag:
<languages />
<translate>
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.
</translate>
All internal links should be represented by {{Link}} template:
Original:
Visit the [[Main Page]]
Modified:
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:
[[Help:Translating|help on translating]]
Modified:
{{Link|Help:Translating|help on translating}}
Links to sections, that used square bracket links should also use the link template instead:
Visit the [[Portage#Usage|using Portage]]
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.
For Editors: 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 or deny the request. Make sure to follow the discussion page as this will be used to discuss the reason why a request was denied.
Translation tags
Once a page has been marked for translation, "translation tags" will automatically be added to appropriate elements of a page by the Translate extension. These tags take the form <--T: 15-->
. These tags pertain to the internal workings of the extension, and 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.
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.
For Anyone: Becoming a translator
Requesting to translate pages on the wiki 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 Translators: Translating
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:
- {{Note}}
- {{Warning}}
- {{Important}}
- {{CodeBox}}
- {{FileBox}}
- {{KernelBox}}
- {{Link}}
- {{Confused}}
- {{See}}
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.