Help:Translating

From Gentoo Wiki
Jump to:navigation Jump to:search

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. Do not translate {{Deprecated}} or {{Archived}} articles.

In order to avoid needless work translating outdated content, it's important to take heed of the note at the top of the translating section about articles that might have changes that are not yet marked for translation.

Translators are invited to join the #gentoo-wiki-translation (webchat ) channel on IRC to facilitate coordinating work for everyone - see the wiki IRC channels article.

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.
Important
All contributions must comply with the Gentoo wiki copyright policy and with the Gentoo AI policy. You must be sure to understand and accept those policies prior any contribution.

The wiki project aims to maintain a respectful, constructive environment - please be polite and considerate of other users, and be sure to follow the Gentoo code of conduct. All wiki edits should be made in the spirit of moving the project towards the common goals. Documentation and discourse should be objective and rooted in fact. The project is consensus-based - please listen to the admins, devs, and other editors.

For all editors: how to work with translated articles

Articles in English that are translated into other languages have some particularities that all editors must know about:

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 - they should simply be ignored, and preserved along with the text they mark.

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 can be reviewed and the page can be marked for translation again, which will add translation tags to the new sections.

If copy-pasting text between articles, be sure to remove inappropriate translation tags from the pasted text.

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

Articles should only be made translatable once they are reasonably complete and correct, and are not currently undergoing major changes. Before a page can be translated, tag the translatable sections with <translate> tags (in most cases, that is the whole article).

Add a language selection bar at the top of an article with the <languages /> tag.

So, to tag content as translatable, put it into <translate> tags, like this:

CODE Tagging an article to be translated
<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>

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.

When a page is marked for translation, a link with the text "Translate this page" will appear on the top of the page, to allow access to the translation interface.

When a translated article's content is changed, it will again need to be marked for translation, to allow the modified content to be translated. Pages that have pending changes will have the text "this page contains changes which are not marked for translation" at the top. It's important to avoid working on translating such pages, as this would often mean translating outdated content. 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 will be a link that can be clicked to start the process of marking the page for translation.

Tip
If waiting for an article to be marked in order to translate it, it may be possible to contact an admin or lead-translator to request that an article be reviewed and marked for translation. The #gentoo-wiki-translation (webchat ) channel on IRC can be a good place to try to get attention for this.

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. Sections must be passed to the template parameter section in order for the links to work on non-English pages:

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.

For translators - how to translate articles into other languages

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.

The list of translated languages on the wiki should be the list of languages at the top of this page (as the first act of adding a new translated language should be to translate this page).

Translating

Important
It's important to check if an article has changes that are not yet marked for translation, in order to avoid needlessly translating outdated content.


Before working on translating an article, look at the top of it's main English page (not the "/en" subpage): if the message is "this page contains changes which are not marked for translation" (or "this page has changes since it was last marked for translation"), do not attempt to translate the content (only an "outdated" version will be available for translation). First get the page marked for translation as explained in the request page translation section.

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.

Advanced

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.