Довідка:Розширення:Translate/Офлайн переклад

From mediawiki.org
This page is a translated version of the page Help:Extension:Translate/Off-line translation and the translation is 45% complete.
Outdated translations are marked like this.

Ця сторінка пояснює як перекладати офлайн. Якщо вас це цікавить, ви, напевно, вже знаєте, що таке файли Gettext PO. З цієї причини ми обговоримо лише те, як використовувати їх у вікі з розширенням Translate. Otherwise, you're probably more interested in the How to translate tutorial for online translation.

Загалом, ви можете не використовувати веб-інтерфейс, якщо у вас дуже повільне або обмежене інтернет-з’єднання або автономні інструменти, без яких ви не можете обійтися. Be aware, however, that the Translate extension is designed as a collaborative process. This means that you should not hold the files offline for long times, and you should always download a new file just before you start translating. Otherwise you might conflict with other translators who work in the wiki.

Експорт

Ви можете завантажити будь-яку групу повідомлень як файл Gettext PO, обравши команду експортувати для перекладу офлайн на сторінці Спеціальна:Переклад. На деяких сайтах ця команда може бути вимкнена. Ви повинні перевірити чи нема локальних довідок про те, як отримати ці файли, перед початком. Some sites might have disabled this task. You should check any local guides how to process these files before you start.

Хоча деякі групи повідомлень можуть мати опцію експорту, що експортує переклади в рідний формат цієї групи і цей формат може бути Gettext, це не файли, що можуть бути використані для офлайн перекладу!

Файли є стандартними файлами Gettext PO з додатковою інформацією. The header contains some extra fields shown below; the msgctxt for each message contains an identifier that the Translate extension needs. Some editors are known to strip either the header comments or the msgctxt lines, so start with a small file to make sure that your editor does not remove these ― it's not funny to realize the editor was buggy after translating hundreds of messages that you cannot import back into the online system! The message documentation is exported as translation comments.

Важливі поля шапки:

"X-Language-Code: nl\n"
"X-Message-Group: ext-abc\n"

У цьому прикладі «ext-abc» є назвою групи повідомлень. Для сторінок, які підлягають перекладу, відповідна група повідомлень має назву «page-» + назва сторінки (так для сторінки «Example» заголовок міститиме рядок "X-Message-Group: page-Example\n")

Приклад запису у файлі GetText po., перекладеному тут з англійської(в рядку "msgid") німецькою (в рядку "msgstr"):

#. [Wiki] This text is used on the history tab.
#. [Wiki] 

msgctxt "history_short"
msgid "History"
msgstr "Versionsgeschichte"

Notice the line starting by msgctxt: it briefly explains the context of usage for the message given in the next msgid line. Such msgctxt line is optional but recommended. After importing the .po file, this contextual text will be made visible to users of the Translate UI on the wiki, and it should be kept or updated when needed.


Імпорт

Немає необхідності повністю перекладати файл. Завантаження частково перекладених груп повідомлень цілком нормально. There are two ways to import these files.

The users with correct user rights can use Special:ImportTranslations to upload and import the translations. The special page processes the file, shows the changes and lets the user import them. For large files with lots of changes the importing might take multiple steps, as the processing time is limited.

Імпортування також може бути здійснено за допомогою скрипту, що використовує командний рядок, Translate/script/poimport.php. Цей спосіб менш гнучкий, але може імпортувати все за один раз. Цей спосіб також вимагає втручання людини з доступом до командного рядка сервера.

Спосіб, за яким імпорт офлайн перекладів здійснюється (або ні), залежить від Вашої вікі.

Редактори Gettext

Тут наведено список деяких інструментів, що Ви можете використати для офлайн перекладу.

POedit
Доступно для всіх платформ, що підтримують інструментарій wxWidgets, перевірено на Unix з GTK і Windows.
ПОПЕРЕДЖЕННЯ: переконайтеся, що ви використовуєте версію 1.4.2 або вище, інакше рядки «msgctxt» будуть видалені, і ваша робота не може бути оброблена.
gtranslator
Can be used in the GNOME desktop environment on Unix and Linux platforms.
Lokalize
Uses the KDE 4 Desktop Environment on all platforms supporting it. Has a user wiki and online handbook
Translate Toolkit
Toolkit written in the python programming language which must be installed as well, usable on all platforms. Supports several other file formats as well.
Virtaal
Multi-format translation tool based on the toolkit above. Currently working in Windows and Linux.
OmegaT
Free tool for professional translators written in Java, requires Java installed; available on all platforms. Supports a variety of other file formats, glosssaries, fuzzy matching, and translation memories.
Eazy PO
Small program, runs on Windows, no installation required.
Gorm PO file editor
Small powerful program, runs on Windows, no installation required, version 1.0 fails on msgctxt tags.
Better PO Editor
Available as source code for Windows, BSD, Unix, Linux, Mac OS X. Includes spell checker and Google Translate suggestions.
gted
Usable as a plugin in the Eclipse IDE under Linux, Windows and MAC OS X; embeds various tools.