Difference between revisions of "Help:Translating"

From Gentoo Wiki
Jump to:navigation Jump to:search
(tip about empty lines in code boxes - I think I get it now)
(One intermediate revision by the same user not shown)
Line 31: Line 31:
 
</translate>
 
</translate>
 
</nowiki>}}
 
</nowiki>}}
 +
 +
All internal links should be prepended by <code>Special:MyLanguage/</code> and appended with a description after a pipe if not already existing:
 +
 +
Original:
 +
 +
{{CodeBox|title=Changing links to use Special:MyLanguage|1=<nowiki>
 +
Visit the [[Main Page]]
 +
</nowiki>}}
 +
 +
Modified:
 +
 +
{{CodeBox|title=Changing links to use Special:MyLanguage|1=<nowiki>
 +
Visit the [[Special:MyLanguage/Main Page|Main Page]]
 +
</nowiki>}}
 +
 +
Additionally, sections should be tagged like <code>&lt;span id="{section name in English}"&gt;&lt;/span&gt;</code> so any hash references are equal between languages.  These are NOT to be translated on subsequent languages.
  
 
<!--T:7-->
 
<!--T:7-->

Revision as of 15:20, 24 February 2023

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.

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:

CODE Marking an article translatable
&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;

All internal links should be prepended by Special:MyLanguage/ and appended with a description after a pipe if not already existing:

Original:

CODE Changing links to use Special:MyLanguage
Visit the [[Main Page]]

Modified:

CODE Changing links to use Special:MyLanguage
Visit the [[Special:MyLanguage/Main Page|Main Page]]

Additionally, sections should be tagged like <span id="{section name in English}"></span> so any hash references are equal between languages. These are NOT to be translated on subsequent languages.

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.

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.

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.

Special templates

These templates are translated:


NEW! Templates do not need to be changed, they automatically display translated strings.

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.