Help:Translation: различия между версиями

Wiki созданная сообществом Ashes of Creation
Перейти к навигации Перейти к поиску
м
м (Text replacement - "Template:Help:Translating proper nouns" to "Template:Help:What to translate")
 
(не показано 19 промежуточных версий 1 участника)
Строка 1: Строка 1:
[[File:language_selection.png|thumb|500px|class=uls-trigger|link=Special:SelectLanguage|[[Special:SelectLanguage|Select your language]] on the top menu.]]
+
{{Template:Help:Translation}}
 
 
[[Ashes of Creation Wiki]] is currently being translated into multiple [[Special:SelectLanguage|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]].
 
  
 
== Quick start guide ==
 
== Quick start guide ==
  
{{cbox|[[File:info-orange.png|50px]]|Before you start translation, ensure your wiki language is [{{fullurl:Help:{{ROOTPAGENAME}}|setlang=en}} set to English], which is the base language of this wiki.}}
+
{{Template:Help:Translation quick start guide}}
 
 
# Navigate to the article you wish to translate. Here we will use the [[Nodes]] article as an example:<br/>[[File:translation_guide_1.png|600px|center]]
 
# Click on "Page information" on the left-hand side of the page. This will show the templates being used in the article:<br/>[[File:translation guide 2.png|600px|center]]
 
# Click on a template to view the text:<br/>[[File:translation guide 3.png|600px|center]]
 
# Copy the URL and paste it into a new browser tab or window:<pre>https://ashesofcreation.wiki/Template:Nodes</pre>
 
# Add your [[mw:Language code|language code]] to the end of the URL. For example, to create a Russian translation of the Nodes template add <code>/ru</code> to the end of the URL: <pre>https://ashesofcreation.wiki/Template:Nodes/ru</pre>
 
# Click "Create" to see blank page where you can input the translation for that block of text. If the page already exists, click "Edit":<br/>[[File:translation guide 4.png|600px|center]]
 
# 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.
 
  
 
=== Helpful resources ===
 
=== Helpful resources ===
  
{{Ashes of Creation Wiki helpful resources}}
+
{{Template:Help:Ashes of Creation Wiki helpful resources}}
  
== Translation reports ==
+
== What to translate ==
  
[[File:translation todo.png|thumb|450px]]
+
{{Template:Help:What to translate}}
[[File:translation search.png|thumb|450px]]
 
  
* [[Special:TranslationTODO]] shows outdated translations.
+
== Translation reports ==
* [[Special:TranslationSearch]] searches translated pages.
 
  
''Note that these reports will not show pages in the <code>MediaWiki:</code> namespace unless explicitly selected from the dropdown list.''
+
{{Template:Help:Translation reports}}
  
 
== Translating at the template level ==
 
== Translating at the template level ==
  
=== Wiki structure ===
+
{{Template:Help:Translating at the template level}}
<pre style="width:250px;">
 
[[Article1]]
 
    {{Template1}}
 
    {{Template2}}
 
    {{Template...}}
 
</pre>
 
  
[[Ashes of Creation Wiki]] uses [[Help:Templates|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.
+
== Translation status ==
  
==== Example ====
+
{{Template:Help:Translation status}}
  
[[Nodes]]
+
== Protected pages ==
<pre style="width:250px;">{{Nodes}}
 
  
{{Node benefits}}
+
{{Template:Help:Translating protected pages}}
 
 
== Zone of influence ==
 
 
 
{{Zone of influence}}
 
 
 
== Node advancement ==
 
 
 
{{Node advancement}}
 
 
 
=== Trophy park ===
 
 
 
{{Trophy park}}
 
</pre>
 
 
 
=== Wiki structure with translation ===
 
 
 
<pre style="width:250px;">
 
[[Article1]]
 
    {{Template1}}
 
      {{Template1/L1}}
 
      {{Template1/L2}}
 
      {{Template1/L...}}
 
    {{Template2}}
 
      {{Template2/L1}}
 
      {{Template2/L2}}
 
      {{Template2/L...}}
 
    {{Template...}}
 
</pre>
 
 
 
Adding language variations of each template is straightforward. Simply append a [[mw:Language code|language code]] to the end of the title then add in the translation to the new template. For example:
 
 
 
# [[Template:Fréttinga services]] is the original English language template.
 
# [[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 ==
 
== Demonstration ==
  
We have created a demo article called [[Fréttinga]] to illustrate how this extension works.
+
{{Template:Help:Translation demonstration}}
 
 
* View the Fréttinga article in [{{fullurl:Fréttinga|uselang=de}} German] (note your browser may auto translate this back to your native language).
 
* View the Fréttinga article in an [{{fullurl:Fréttinga|uselang=qq}} unsuppored language] (this should default to English).
 
 
 
=== Example ===
 
 
 
[[Template:Fréttinga about]]
 
<pre style="width:250px;">[[Fréttinga]] is a small municipality in MungoLand, located on the BaMungo island.</pre>
 
 
 
[[Template:Fréttinga about/de]]
 
<pre style="width:250px;">[[Fréttinga]] ist eine kleine Gemeinde in MungoLand, auf der BaMungo Insel.</pre>
 
  
 
== Heading and title translation ==
 
== Heading and title translation ==
  
Article titles and headings within articles are treated like [[mw:Help:System_message|localized messages]].
+
{{Template:Help:Heading and title translation}}
 
 
=== Heading translation ===
 
 
 
Each heading within an article is checked to see if a message exists in the <code>MediaWiki:</code> namespace corresponding to the [[#How translation works|current language code]]. If the translation exists it will be automatically substituted for the heading text.
 
 
 
==== Example ====
 
 
 
[[MediaWiki:Services/de]]
 
<pre style="width:250px;">Dienstleistungen</pre>
 
 
 
This translates the <code>== Services ==</code> heading in the [[Fréttinga]] article (and all other articles where that heading text appears) into [{{fullurl:Fréttinga|uselang=de}} German].
 
 
 
[[File:translation guide 6.png|600px|center]]
 
 
 
This method works for all heading levels.
 
 
 
=== Article title translation ===
 
 
 
Each article's title is checked to see if a message exists in the <code>MediaWiki:</code> namespace corresponding to the [[#How translation works|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]]
 
<pre style="width:250px;">Fréttinga dienstleistungen</pre>
 
 
 
This translates the page title of [[Fréttinga services]] for [{{fullurl:Fréttinga services|uselang=de}} German] readers without requiring any redirects.
 
 
 
[[File:translation guide 5.png|600px|center]]
 
 
 
=== Link translation ===
 
 
 
{{cbox|[[File:info-orange.png|50px]]|This feature is in alpha testing. Your [[{{TALKPAGENAME}}|feedback]] is very welcome!}}
 
 
 
Each link is checked to see if a message exists in the <code>MediaWiki:</code> namespace corresponding to the [[#How translation works|current language code]]. If the translation exists it will be automatically substituted for the link text.
 
 
 
==== Example ====
 
 
 
<pre style="width:250px;">== See also ==
 
 
 
* [[Seasons]]
 
* [[Exploration]]
 
* [[Underrealm]]
 
* [[Underwater]]</pre>
 
 
 
If <code>MediaWiki:Exploration/de</code> is not defined but all other translations are, then the output of the above in the German language will be as follows:
 
 
 
[[File:translation links.png|center]]
 
 
 
== Search translation ==
 
 
 
; External searches
 
: Generate localized sitemaps for each language variant of a page.
 
 
 
; Internal searches
 
: Investigate localization of Elastica/Cirrus search engine (work-in-progress).
 
 
 
== How translation works ==
 
 
 
[[File:1280px-MediaWiki fallback chains.svg.png|thumb|450px|[[mw:Manual:Language#Fallback_languages|Fallback chains]]]]
 
 
 
The custom translation extension automatically identifies the user's language in one of the following ways.
 
 
 
* The user's [[Special:Preferences|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: [{{fullurl:Fréttinga|uselang=de}} 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 [[mw:Manual:Language#Fallback_languages|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 ==
 
== 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.
+
{{Template:Help:Sidebar translation}}
 
 
{{MediaWiki:Sidebar}}
 
 
 
The format of the navigation section is as follows:
 
 
 
<pre style="width:250px;">link-url|link-text</pre>
 
 
 
These refer to messages in the <code>Mediawiki:</code> 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 <code>Mediawiki:</code> namespace with the appropriate language code. For example:
 
 
 
* [[Mediawiki:reactiveworld]]
 
: <pre style="width:250px;">Nodes, Economy</pre>
 
 
 
* [[Mediawiki:reactiveworld/de]]
 
: <pre style="width:250px;">Knoten, Wirtschaft</pre>
 
  
 
== Image overlay text ==
 
== Image overlay text ==
  
The extension enables text overlays to assist with translating images that contain text.
+
{{Template:Help:Image overlay text}}
  
* Enable this mode by adding the <code>class=lloverlay</code> parameter to the image (see example below).
+
== How translation works ==
* 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 ===
 
 
 
[[File:DungeonsRaidsMonsterCoinsGeneric.png|right|500px|link=Player interaction|class=lloverlay|Рейды, Гильдии, Боевая Система]]
 
[[Template:Ashes of Creation Wiki menu/ru]]
 
<pre style="width:550px;">[[File:DungeonsRaidsMonsterCoinsGeneric.png|right|500px|link=Player interaction|class=lloverlay|Рейды, Гильдии, Боевая Система]]</pre>
 
 
 
=== Custom overlay styles ===
 
 
 
To use a custom image overlay style, use <code>class=lloverlay-''custom''</code>. Your custom CSS class will be <code>.image-lloverlay-''custom''</code>.
 
 
 
=== Example ===
 
  
CSS for custom image overlay with red text: <code>class=lloverlay-redtext</code>
+
{{Template:Help:How translation works}}
  
<pre style="width:550px;">.image-lloverlay-redtext {
+
=== Search translation ===
    color: #f00;
 
    font-size: 30px;
 
    line-height: 1.5em;
 
    text-shadow: 2px 2px 2px #000;
 
    text-align: center;
 
    position: absolute;
 
    top: 50%;
 
    left: 50%;
 
    transform: translate(-50%, -50%);
 
    width: 100%;
 
    pointer-events: none;
 
}</pre>
 
  
== Category language filter ==
+
{{Template:Help:Search translation}}
  
{{cbox|[[File:info-orange.png|50px]]|This is a potential feature.}}
+
== See also ==
  
Filter articles in a category to those related to the currently selected language.
+
* [[Help:Style guidelines|Ashes of Creation Wiki style guidelines]]
 +
{{Template:Help:Ashes of Creation Wiki helpful resources}}

Текущая версия от 21:10, 26 августа 2022

Выберите язык в верхнем меню.
info-orange.pngЕсли вы измените свой язык, вам может потребоваться снова войти в свою учетную запись вики на этом языке.

В настоящее время Ashes of Creation Wiki переводится на несколько языков. Это краткое руководство о том, как переводить статьи.

  • Если вы заинтересованы в переводе этой вики, пожалуйста, внимательно прочитайте эту статью.
  • За дополнительной информацией обращайтесь в наш Discord.

Краткое руководство

info-orange.pngНовые переводчики. Ваши переводы могут потребовать одобрения куратора, прежде чем они появятся на вики.
  1. Перейдите к статье, которую хотите перевести, и нажмите «Изменить» (или «Просмотреть исходный код», в зависимости от вашего уровня доступа). Здесь мы будем использовать статью Узлы в качестве примера.
    translation guide 1.png
  2. Нажмите на шаблон который вы хотите перевести, затем нажмите на связанную с ним ссылку на шаблон.
    translation guide 2.png
  3. Если вы находитесь на англоязычной вики, выберите язык, на который хотите перевести страницу.
    translation guide 3.png
  4. В противном случае, если вы находитесь на другом языке вики и шаблон для этого языка не существует, вики автоматически скопирует англоязычную версию, чтобы использовать ее в качестве основы для вашего перевода.
    translation guide 4.png
  5. Когда вы закончите перевод, нажмите «Сохранить изменения». Вы также можете предварительно просмотреть свою работу, нажав «Показать предварительный просмотр». Это покажет текст в том виде, в котором он будет отображаться в вики, без его сохранения.

Полезные источники

Что переводить

Не переводите имена собственные (например, Ashes of Creation, Intrepid Studios и имена людей). Пожалуйста, оставьте их на английском языке, где это возможно.

Весь остальной вики-контент должен быть переведен.

Отчеты о переводе

translation todo.png

Обратите внимание, что эти отчеты не будут отображать страницы в пространстве имен MediaWiki: если они явно не выбраны из раскрывающегося списка.

Перевод на уровне шаблона

Вики-структура

[[Статья1]]
    {{Шаблон1}}
    {{Шаблон2}}
    {{Шаблон...}}

В Ashes of Creation Wiki используются шаблоны для хранения небольших блоков информации, как показано выше. Затем эти шаблоны собираются на страницах контента для формирования статей. Эта структура, ориентированная на шаблоны, обеспечивает идеальную основу для добавления в перевод.

Пример

Узлы

{{Nodes}}

{{Node benefits}}

== Zone of influence ==

{{Zone of influence}}

== Node advancement ==

{{Node advancement}}

=== Trophy park ===

{{Trophy park}}

Вики-структура с переводом

[[Статья1]]
     {{Шаблон1}}
       {{Шаблон1/L1}}
       {{Шаблон1/L2}}
       {{Шаблон1/L...}}
     {{Шаблон2}}
       {{Шаблон2/L1}}
       {{Шаблон2/L2}}
       {{Шаблон2/L...}}
     {{Шаблон...}} 

Добавить языковые варианты каждого шаблона очень просто. Просто добавьте код языка в конец заголовка, а затем добавьте перевод в новый шаблон. Например:

  1. Template:Fréttinga services является оригинальным шаблоном на английском языке.
  2. Template:Fréttinga services/de является его переводом на немецкий язык.

Статус перевода

Bulbgraph.png Примечание: Эта функция временно отключена из-за загруженности сервера.

Переведенные статьи с устаревшими шаблонами переводов будут показывать сообщение в верхней части этой статьи. Если навести указатель мыши на сообщение о статусе перевода, отобразится список устаревших шаблонов перевода для этой статьи.

outdated translations.png

Защищенные страницы

Домашняя страница вики и другие страницы с высоким трафиком защищены, чтобы избежать возможности случайного или преднамеренного искажения.

  • Новым переводчикам рекомендуется избегать перевода защищенных страниц до тех пор, пока они не приобретут достаточный опыт перевода.

Демонстрация

Мы создали демонстрационную статью под названием Fréttinga, чтобы проиллюстрировать, как работает это расширение.

  • Просмотрите статью Fréttinga на немецком языке (обратите внимание, что ваш браузер может автоматически переводить ее обратно на ваш родной язык).

Пример

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.

Перевод заголовков и названий

Названия статей и заголовки внутри статей обрабатываются как локализованные сообщения.

  • Пожалуйста, не используйте косую черту в заголовках. Например: используйте дневной и ночной цикл, а не дневной/ночной цикл.

Перевод заголовков

При нажатии на заголовок в редакторе страниц появится ссылка на перевод этого заголовка в пространстве имен MediaWiki: nдля текущего выбранного языка.

Каждый заголовок в статье проверяется, чтобы увидеть, существует ли сообщение в пространстве имен MediaWiki: соответствующем текущему языковому коду. Если перевод существует, он будет автоматически заменен текстом заголовка.

Пример

MediaWiki:Services/de

Dienstleistungen

Это переводит заголовок == Services == в статье Fréttinga article (и во всех других статьях, где появляется этот текст заголовка) на немецкий язык.

translation guide 6.png

Этот метод подходит для всех уровней заголовков.

Перевод названия статьи

Каждая ссылка проверяется, чтобы увидеть, существует ли сообщение в пространстве имен MediaWiki:, соответствующем текущему языковому коду. Если перевод существует, он автоматически заменит текст ссылки.

Note: Это применимо только к статьям. Это не требуется для шаблонов, так как они никогда не отображают заголовки своих страниц.

Пример

MediaWiki:Fréttinga services/de

Fréttinga dienstleistungen

Это переводит название страницы Fréttinga services для немецких читателей без необходимости каких-либо перенаправлений.

translation guide 5.png

Перевод ссылки

Каждая ссылка проверяется, чтобы увидеть, существует ли сообщение в пространстве имен MediaWiki: соответствующем текущему языковому коду. Если перевод существует, он автоматически заменит текст ссылки.

Пример

== See also ==

* [[Seasons]]
* [[Exploration]]
* [[Underrealm]]
* [[Underwater]]

Если MediaWiki:Exploration/de е определен, а все остальные переводы определены, то вывод приведенного выше на немецком языке будет следующим:

translation links.png

Перевод боковой панели

Mediawiki:sidebar (левое меню) может быть переведена так же, как описано выше. Каждый элемент на боковой панели имеет ссылку на URL и текстовую ссылку.

  • 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

Формат раздела навигации следующий:

URL-адрес ссылки|текст-ссылки

Они ссылаются на сообщения в пространстве имен Mediawiki:

  • Левая сторона перед знаком '|' относится к URL-адресу ссылки.
  • Правая часть после символа '|' относится к тексту, отображаемому на боковой панели.

Чтобы создать перевод этих элементов, просто создайте страницу в пространстве имен Mediawiki: с соответствующим кодом языка. Например:

Nodes, Economy
Knotenpunkte, Wirtschaft

Наложение текста на изображение

Расширение позволяет накладывать текст, чтобы облегчить перевод изображений, содержащих текст.

  • Включите этот режим, добавив к изображению параметр class=lloverlay (см. пример ниже).
  • Указанный текст подписи будет наложен поверх самого изображения.
  • Это будет работать только с изображениями без рамок, которые выровнены по левому краю, центру или правому краю.

Пример

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

Template:Ashes of Creation Wiki menu/ru

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

Пользовательские стили наложения

Чтобы использовать собственный стиль наложения изображения, используйте class=lloverlay-пользовательский. YВаш пользовательский класс CSS будет . .image-lloverlay-пользовательский.

Пример

CSS для пользовательского наложения изображения с красным текстом: class=lloverlay-redtext

.image-lloverlay-redtext {
     color: #f00;
     font-size: 30px;
     line-height: 1.5em;
     text-shadow: 2px 2px 2px #000;
     text-align: center;
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     width: 100%;
     pointer-events: none;
}

Как работает перевод

Расширение пользовательского перевода автоматически определяет язык пользователя одним из следующих способов.

  • Страница настроек пользователя (если у него есть вики-аккаунт).
  • От пользователя, нажавшего на переключатель языка в верхней части страницы.
  • Добавляя префикс субдомена LANGCODE к URL-адресу страницы, например: http://de.ashesofcreation.wiki/Fréttinga

Как только язык станет известен, расширение автоматически найдет и применит правильные переводы для этого языка.

  • Если для этого языка не существует переведенных шаблонов, названий или заголовков, они будут заменены на совместимый язык.
  • Если резервный язык не может быть найден, расширение по умолчанию будет использовать английский, который является базовым языком вики.

Выбор языка происходит на самом низком уровне. Например: если для языка пользователя существуют все шаблоны, кроме одного, то будет использоваться только этот отсутствующий шаблон.

Поиск перевода

Внешний поиск
Локализованные карты сайта создаются для каждого языкового варианта страницы.
Внутренний поиск
Изучение локализации поисковой системы Elastica/Cirrus (в разработке).

Смотрите также