Справка:Расширение:Перевод/Пример страницы для перевода

From mediawiki.org
This page is a translated version of the page Help:Extension:Translate/Page translation example and the translation is 55% complete.
Видео-урок использования расширения Расширение:Перевод

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

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

Пожалуйста, обратите внимание:
  • Consequently, we will consider that you are a Translation administrator on your wiki (...if you can, you should declare yourself now !), otherwise you may not access to some of the links/pages described here.
  • Помните также, что это всего лишь простое руководство. You can see an Example of marked code prepared by best practices.
Поехали!

Шаг 1: Перед началом

Исходная страница

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

Эта страница описывает воображаемый муниципалитет Fréttinga.

Here is the wikicode associated to it:

Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summertime.

== Services ==

It doesn't have many services. There is a shop, and a car ferry visits the island
from the mainland once a day.
  • 1. Go to the page [[Fréttinga]] in your wiki (or a draft page) and click create.
  • 2. Paste the above content and save it.

Шаг 2: Подготовка

Подготовка: Помечаем эту страницу как доступную для перевода

Теперь у нас есть страница с каким-то текстом.

Если страница всё ещё часто подвергается изменениям, стоит дождаться, когда изменения замедлятся до нормального уровня и только тогда добавить её в систему переводов. Это следует иметь в виду для того чтобы снизить нагрузку на переводчиков, поскольку им придётся переводить все изменения.

The page is ready for translation? So let's see how to request translation:

  • 3. Edit [[Fréttinga]]
  • 4. Wrap the whole content inside ‎<translate>...‎</translate> tags as shown below
  • 5. Save the page
<translate>
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summertime.

== Services ==

It doesn't have many services. There is a shop, and a car ferry visits the island
from the mainland once a day.
</translate>

Вам не надо добавлять тег ‎<translate> ко всем элементам.

Вам никогда не следует добавлять маркеры типа <!--T:1--> самостоятельно; расширение сделает это за вас на следующем шаге

Шаг 3: Включение переводов

После сохранения страницы, вы увидите вверху страницы ссылку, гласящую «Отметить эту страницу для перевода» — или «на этой странице были произведены [$1 изменения], не отмеченные для перевода.», если вы не входите в группу администраторов перевода. Если вы администратор перевода, кликните по ссылке «Отметить эту страницу для перевода». Страница автоматически разобьётся на 4 блока перевода. Первый — заголовок страницы, второй — это первый абзац, третий — это заголовок второго абзаца, и четвёртый — это текст второго абзаца. Это базовые правила переводимых статей: каждый блок независим; он должен переводиться целиком; изменения на странице требуют обновления всего блока. Блоки можно изменять и удалять.

There is also a view of the page translation page template; this will be covered in later steps.

  • 6. Нажмите на ссылку «Отметить эту страницу для перевода»
  • 7. Ensure that the page body is split into three units correctly
  • 8. Нажмите кнопку «Отметить эту версию для перевода» (reminder: you have to be a Translation administrator for this)
  • 9. Return to the page

Now you will see a new link at the top, "Перевести эту страницу", that lets translators translate the page. You might have a look at the translation tutorial which uses this page as an example and try out few translations now. Then return here for the next step.

Шаг 4: Внесение изменений

Understanding how changes are impacting translations and translations units

Выполнение изменений

Tracking changes is a very important feature, so let's make some changes and see how it works. When you open the page for editing you will see that it has been modified with markers like <!--T:1-->. These are added by the extension and help it identify which unit is which. This allows you to rearrange and edit those units. When editing the page, the markers should be left alone and their position in relation to the unit they belong to should not be changed. When moving a unit, move the unit marker, too.

When deleting a unit, delete the marker too. When adding new paragraphs, new markers will be added by the software. Do not try to do this manually, it may confuse the software. Markers you have deleted will also be automatically deleted by the bot in the existing translations.

If you do minor changes to an existing translation unit (adding a few words or a link to a paragraph), keep the marker. If you change a whole paragraph (delete and rebuilt it), delete the marker. This way, translators will have different tasks, between reviewing a fuzzy translation or create a new translation.

let's modify something!

Here is what you will do:

<languages /> <translate> <!--T:1--> Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing. Tourists like to visit it in the summertime. It has marvelous beaches with a lot of seagulls. == Services == <!--T:2--> <!--T:3--> It doesn't have many services. There is a shop, and a car ferry visits the island from the mainland once a day. In 2009 January the roof of the church in the island fell down. It was rebuilt collaboratively the following summer. </translate>

  • 10. Make some additions as highlighted above
  • 11. Click the "marked for translation" link at the top
  • 12. Observe the changes
  • 13. Нажмите кнопку «пометить для перевода» (reminder: you have to be a Translation administrator for this)
  • 14. Return to the original page

If you made translations as suggested in the previous step, you can now see those translations linked at the top of the page. You will also see that the translation is not 100 % up to date. If you go to the translation view, you see that the unit is marked as in need of updating.

Устаревшие переводы подсвечиваются розовым фоном; пользователю сообщается, что перевод неполон

Режим просмотра шаблона переводимой страницы поможет вам увидеть, какие части страницы постоянны во всех языковых версиях (под «Шаблон страницы перевода» понимаются её части, лежащие вне меток ‎<translate>...‎</translate>), а также покажет вам, были ли какие-либо элементы перемещены или удалены.

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

Теперь вы знаете основные моменты, но этот курс содержит ещё некоторые детали, которые вы можете использовать в работе.

Шаг 5: Добавление других вики-элементов

Итоговый результат

Adding an image, a category and a list with translation markers

You have a basic translatable page now, but it is very dull. Let's add an image and some other stuff to make it look more like a normal wiki page and see how those elements interact with translation.

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

  • 15. Add an image, a category and a list to the page as shown below
  • 16. Save the page
  • 17. Click the link "marked for translation" at the top of the page
  • 18. Verify that the changes look as intended
  • 19. Нажмите кнопку «Отметить эту версию для перевода»
  • 20. Return to the translatable page

<languages /> [[File:Torsö.jpg|thumb|<translate>A typical view of Fréttinga</translate>]] <translate> <!--T:1--> Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing and tourists like to visit it in the summertime. It has marvelous beaches with a lot of [[Special:MyLanguage/Seagull|seagulls]]. == Services == <!--T:2--> <!--T:3--> It doesn't have many services. There is a shop, and a car ferry visits the island from the mainland once a day. Main events: * The roof of the church fell down in 2009 * New church was built in 1877 [[Category:Municipalities]] </translate>

Документирование перевода

Allowing to translate only the picture title:

[[File:Torsö.jpg|thumb|<translate>A typical view of Fréttinga</translate>]]

Or allowing to change the image file in the translated page (for localized version for example) and the title:

<translate>[[File:Torsö.jpg|thumb|A typical view of Fréttinga]]</translate>

Здесь мы оставили большую часть разметки изображения за пределами переводимого блока, в шаблоне переводимой страницы. (reminder: the translation page template doesn't change between the different translated pages) Обычно это допустимо, но иногда переводчики могут захотеть поменять изображение, особенно если оно содержит языковые (текстовые) фрагменты. В таких случаях обычно проще включить в блок всю разметку (как в случае категории).

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

Документация, которую вы добавляете, отображается вот так
  • 21. Click "Перевести эту страницу" link at the top
  • 22. Select "qqq - Документация сообщения" language
  • 23. Click the message name which contains the message "A typical view of Fréttinga"
  • 24. Write "Description of an image" and click "Save"

Now, the documentation "Description of an image" is shown next to the to-be-translated-title of the image.

О ссылках

[[Special:MyLanguage/Seagull]]

Ссылки также можно оформить разным образом. Мы использовали [[Special:MyLanguage/Seagull]], что автоматически перенаправляет к переведенной версии на языке интерфейса пользователя (если такой перевод имеется). Это однако не является универсальным решением, т.к. в данном случае пользователи всегда будут перенаправляться к странице на языке используемого ими интерфейса, а не на языке на котором они читали текст до этого. Special:MyLanguage также конфликтует со Special:WhatLinksHere (приводит к сбою в работе этого кода). В то же самое время, использование Special:MyLanguage всегда выдаст читателю какую-либо версию страницы, даже если перевода на запрошенный язык ещё нет.

О категориях

В данном примере весь сегмент назначения категории является переводимым блоком. Это позволяет переводчикам изменить её как [[Category:Municipalities/de]] или в соответствие с любым другим стандартом именования категорий. Если бы данный сегмент находился вне шаблона перевода, все страницы Foo, Foo/de, Foo/ru, Foo/ta и т.д. попали бы в одну категорию. Иногда это допустимо, но обычно мешает пользователям. Позаботьтесь о том, что ваши переводчики знакомы со стандартом именования категорий в вашей вики.

О заголовках

Чтобы иметь заголовки, считающиеся отдельными элементами от текста, не забывайте добавлять чистую строку между заголовком и следующим за ним параграфом (если таковой ещё нет).

В следующем примере будет только один блок перевода:

== Services ==
It doesn't have many services. There is a shop, and a car ferry visits the island from the mainland once a day.

А в следующем будет создано два блока, один из которых — для заголовка.

== Services ==

It doesn't have many services. There is a shop, and a car ferry visits the island from the mainland once a day.

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

Заключение

Operating on the whole page and its translations

It is also possible to move translatable pages including all their translations to a new name. Because many pages may need to be moved, this operation is not instant. You can delete either the whole page including all translations, or just one translated version of a page. You can access these functions from the same place they are on all other pages.

Managing all wiki's pages translations with Special pages

Special:PageTranslation lists all the pages in the system. Besides giving you an overview of all translatable pages, it is also possible to discourage pages from translation. This hides the page from most lists. It does not prevent further translations.

Now, you know!

Итак, вы создали переводимую страницу и применили к ней все распространенные действия, которые возможны в случае переводимых страниц.

Going deeper?

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

См. также