Différences entre les versions de « Help:Translation »

De Ashes of Creation Wiki
Sauter à la navigation Sauter à la recherche
m
Ligne 3 : Ligne 3 :
 
[[Ashes of Creation Wiki]] is currently being translated into multiple languages. This is a brief guide on how to translate articles.
 
[[Ashes of Creation Wiki]] is currently being translated into multiple languages. This is a brief guide on how to translate articles.
  
 +
* If you are interested in helping to translate this wiki or wish to know more, please contact [[User:Lex|Lex]].
 
* Please provide suggestions and feedback on your experiences with translation [[{{TALKPAGENAME}}|here]].  
 
* Please provide suggestions and feedback on your experiences with translation [[{{TALKPAGENAME}}|here]].  
* If you are interested in helping to translate this wiki or wish to know more, please contact [[User:Lex|Lex]].
 
  
 
== Quick start guide ==
 
== Quick start guide ==

Version du 2 octobre 2018 à 18:43

Translation.svg.png

Ashes of Creation Wiki is currently being translated into multiple languages. This is a brief guide on how to translate articles.

  • If you are interested in helping to translate this wiki or wish to know more, please contact Lex.
  • Please provide suggestions and feedback on your experiences with translation here.

Quick start guide

info-orange.pngBefore you start translation, ensure your wiki language is set to English, which is the base language of this wiki.
  1. Navigate to the article you wish to translate. Here we will use the Nœuds article as an example:
    translation guide 1.png
  2. Click on "Page information" on the left-hand side of the page. This will show the templates being used in the article:
    translation guide 2.png
  3. Click on a template to view the text:
    translation guide 3.png
  4. Copy the URL and paste it into a new browser tab or window:
    https://ashesofcreation.wiki/Template:Nodes
  5. Add your language code to the end of the URL. For example, to create a Russian translation of the Nodes template add /ru to the end of the URL:
    https://ashesofcreation.wiki/Template:Nodes/ru
  6. Click "Create" to see blank page where you can input the translation for that block of text. If the page already exists, click "Edit":
    translation guide 4.png
  7. When you have completed your translation, click "Save". You can also preview your work by clicking "Preview". This will show the text as it would appear in the Wiki without saving it.

Ressources utiles

Template:Ashes of Creation Wiki helpful resources

Locating translated pages that require updating

translation todo.png

Pages who's translation may be out of date can be queried here Special:LexLanguage.

Translating at the template level

Wiki structure

[[Article1]]
    {{Template1}}
    {{Template2}}
    {{Template...}}

Ashes of Creation Wiki uses templates to house small blocks of information, as illustrated above. These templates are then assembled in the content pages to form articles. This template-oriented structure provides an ideal framework for adding in translation.

Example

Nœuds

{{Nodes}}

{{Node benefits}}

== Zone of influence ==

{{Zone of influence}}

== Node advancement ==

{{Node advancement}}

=== Trophy park ===

{{Trophy park}}

Wiki structure with translation

[[Article1]]
    {{Template1}}
      {{Template1/L1}}
      {{Template1/L2}}
      {{Template1/L...}}
    {{Template2}}
      {{Template2/L1}}
      {{Template2/L2}}
      {{Template2/L...}}
    {{Template...}}

Adding language variations of each template is straightforward. Simply append a language code to the end of the title then add in the translation to the new template. For example:

  1. Template:Fréttinga services is the original English language template.
  2. Template:Fréttinga services/de is its German language translation.

Note: Please set your wiki language to English while you are creating template translations.

Demonstration

We have created a demo article called Fréttinga to illustrate how this extension works.

  • View the Fréttinga article in German (note your browser may auto translate this back to your native language).
  • View the Fréttinga article in an unsuppored language (this should default to English).

Example

Template:Fréttinga about

[[Fréttinga]] is a small municipality in MungoLand, located on the BaMungo island.

Template:Fréttinga about/de

[[Fréttinga]] ist eine kleine Gemeinde in MungoLand, auf der BaMungo Insel.

Heading and title translation

Article titles and headings within articles are treated like localized messages.

Heading translation

Each heading within an article is checked to see if a message exists in the MediaWiki: namespace corresponding to the current language code. If the translation exists it will be automatically substituted for the heading text.

Example

MediaWiki:Services/de

Dienstleistungen

This translates the == Services == heading in the Fréttinga article (and all other articles where that heading text appears) into German.

translation guide 6.png

This method works for all heading levels.

Article title translation

Each article's title is checked to see if a message exists in the MediaWiki: namespace corresponding to the current language code. If the translation exists it will be automatically substituted for the title text.

Note: This is only applicable to articles. This is not required for Templates, as they never display their page titles.

Example

MediaWiki:Fréttinga services/de

Fréttinga dienstleistungen

This translates the page title of Fréttinga services for German readers without requiring any redirects.

translation guide 5.png

Link translation

info-orange.pngThis feature is work in progress!

Each link in is checked to see if a message exists in the MediaWiki: namespace corresponding to the current language code. If the translation exists it will be automatically substituted for the link text.

Search translation

info-orange.pngThis feature is work in progress!
External searches
Generate localized sitemaps for each language variant of a page.
Internal searches
Investigate localization of Elastica/Cirrus search engine.

How translation works

The custom translation extension automatically identifies the user's language in one of the following ways.

  • The user's preferences page (if they have a wiki account).
  • From the user clicking on the language selector at the top of the page.
  • By manually adding uselang=LANGCODE to a page's URL, for example: Fréttinga?uselang=de

Once a language is known, the extension will automatically locate and apply the correct translations for that language.

  • If translated templates, titles or headings don't exist for that language, they will fall back to a compatible language.
  • If the fallback language can't be found, the extension will default to English, which is the base language of the wiki.

Language selection happens at the lowest level. For example: If every template exists for the user's language except one, then only that missing template will fall back.

Sidebar translation

The Mediawiki:sidebar (left-hand menu) is able to be translated in a similar manner as described above. Each element on the sidebar has a url reference and a text reference.

  • navigation
    • mainpage|mainpage-description
    • development-url|development
    • engagingandimmersivestory-url|engagingandimmersivestory
    • reactiveworld-url|reactiveworld
    • playerinteraction-url|playerinteraction
    • playeragency-url|playeragency
    • riskvsreward-url|riskvsreward
    • recentartwork-url|recentartwork
    • recentmedia-url|recentmedia
    • recentchanges-url|recentchanges
    • randompage-url|randompage
    • help-url|help
  • LANGUAGES
  • SEARCH
  • TOOLBOX
  • socialmedia
    • wikidiscord-url|wikidiscord
    • wikibot-url|wikibot
    • wikiyoutube-url|wikiyoutube
    • wikipopups-url|wikipopups

The format of the navigation section is as follows:

link-url|link-text

These refer to messages in the Mediawiki: namespace.

  • The left-hand side before the '|' refers to the link's url.
  • The right-hand side after the '|' refers to the text that appears on the sidebar link.

To create a translation of these elements, simply create a page in the Mediawiki: namespace with the appropriate language code. For example:

Nodes, Economy
Knoten, Wirtschaft

Image overlay text

The extension enables text overlays to assist with translating images that contain text.

  • Enable this mode by adding the class=overlay parameter to the image (see example below).
  • The specified caption text will then be overlayed over the image itself.
  • This will only work with frameless images that are left, center or right aligned.

Example

Рейды, Гильдии, Боевая Система

Template:Ashes_of_Creation_Wiki:Menu/ru

[[File:DungeonsRaidsMonsterCoinsGeneric.png|right|500px|link=Player interaction|class=overlay|Рейды, Гильдии, Боевая Система]]

Category language filter

info-orange.pngThis is a potential feature. Due to the removal of article redirects this may not be necessary.

Filter articles in a category to those related to the currently selected language.