Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
translate:перевод_документации [2012/05/02 16:39] |
translate:перевод_документации [2013/06/21 08:34] (текущий) [1. Generating a translation template] |
||
---|---|---|---|
Строка 1: | Строка 1: | ||
Ссылка на источник: [[https://wiki.ubuntu.com/DocumentationTeam/Translation|Англоязычная wiki]] | Ссылка на источник: [[https://wiki.ubuntu.com/DocumentationTeam/Translation|Англоязычная wiki]] | ||
- | FIXME: нужен перевод статьи, срочно | + | FIXME: нужен перевод статьи |
- | ====== Introduction ====== | + | ====== Введение ====== |
- | Translating documentation requires some special considerations which do not apply when translating programs. This page contains instructions for translators and an explanation of the toolchain used to convert the documentation into translation templates and back again. | + | Перевод документации выполняется немного иначе, чем перевод программ. Эта страница содержит инструкции для переводчиков и объяснение последовательности команд, используемых для преобразования документации в шаблоны перевода и обратно. |
- | ===== For Translators ===== | + | ===== Информация для переводчиков ===== |
- | Ubuntu documentation uses Rosetta as a translation portal, as with the rest of Ubuntu. For explanations of how to use Rosetta, see the [[Rosetta]] page. | + | Для перевода документации Ubuntu, как и для перевода программ, используется портал Launchpad Translation (Rosetta). |
- | The documentation can be found in the following packages: 'ubuntu-docs', 'kubuntu-docs', 'edubuntu-docs' and 'xubuntu-docs'. | + | Документацию можно найти в следующих пакетах : 'ubuntu-docs', 'kubuntu-docs', 'edubuntu-docs' и 'xubuntu-docs'. |
- | There are a number of specific considerations to bear in mind when translating documentation. | + | Имеется несколько особенностей, которые надо учитывать при переводе документации. |
- | {{attachment:IconsPage/IconNote.png}} ''Failure to observe these instructions will result in the translated document breaking.'' | + | {{attachment:IconsPage/IconNote.png}} ''Несоблюдение этих инструкций приведёт к повреждению переводимого документа.'' |
- | - **Tags should not be translated.** Where you see a tag in the translation (for example: "'<xref linkend="free-software"/>'"), the tag and anything inside the tag itself should not be translated. It is very important to copy and paste these tags **exactly** as they appear in this English. The exception to this is where a tag contains a URL where there is an equivalent translated URL. In those cases the translator should use discretion about whether to localise the URL. | + | - **Не следует переводить теги.** Если вам встретился в тексте тег (например: "'<xref linkend="free-software"/>'"), то этот тег и всё, что находится внутри самого тега, переводить не следует. Очень важно копировать и вставлять теги **точно так**, как они выглядят в английском тексте. Исключением является тег, содержащий URL, если имеется URL русскоязычного ресурса. В этом случае переводчик должен сам выбрать, какой URL указывать. |
- | - **Entities should not be translated.** Where you see a phrase expressed like "'>'", do not change this. | + | - **Не следует переводить специальные комбинации символов.** Если вы видите выражение типа "'>'", не переводите его. |
- | - **Always maintain the order of tags.** When you see different tags nested inside each other (for example: "'<menuchoice><guimenu>System</guimenu><guimenuitem>Administration</guimenuitem><guimenuitem>Users and Groups</guimenuitem></menuchoice>'"), you must always preserve that order carefully - copying and pasting from the English is the best way to ensure that you do this correctly. Only translate the words inside the tags. | + | - **Не меняйте исходный порядок тегов.** Если вы видите теги, вложенные один в другой (например: "'<menuchoice><guimenu>System</guimenu><guimenuitem>Administration</guimenuitem><guimenuitem>Users and Groups</guimenuitem></menuchoice>'"), не следует менять этот порядок — копирование и вставка из английского сообщения будет лучшим способом убедиться, что вы его не нарушили. Переведите только слова между тегами. |
- | - For full English copies of the various guides to give you context while translating, click System -> Help and Support in Ubuntu, or Khelpcenter in Kubuntu. Alternatively, all the guides are available to browse at http://doc.ubuntu.com | + | - Чтобы увидеть, в каком контексте используются те или иные сообщения в англоязычной справочной документации, щёлкните Система -> Справка и поддержка в Ubuntu или Khelpcenter в Kubuntu. Вся эта документация также доступна на http://doc.ubuntu.com |
- | - The documents are not automatically imported into Ubuntu (like the translation of programs). They need to be exported and uploaded manually to the packages. The documentation team will take care of this on occasions. | + | - Документы не импортируются в Ubuntu автоматически (как при переводе программ). Их нужно экспортировать и вручную загрузить в пакеты. Об этом должна позаботиться команда документации. |
- | If you have any questions, please ask on the [[https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators|ubuntu-translators]] mailing | + | Если у вас возникли вопросы, задайте их в списке рассылки [[https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators|ubuntu-translators]] или в списке рассылки [[https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc|ubuntu-doc]]. |
- | list: or the [[https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc|ubuntu-doc]] mailing list. | + | |
- | ===== Testing translations ===== | + | ===== Проверка переводов ===== |
+ | <note> | ||
+ | FIXME: Пример явно устарел (Interpid!) и он для французского языка. Надо бы обновить.\\ | ||
+ | FIXME: Обновлять незачем, нужно написать универсально, чтобы не обновлять статью каждые полгода.\\ | ||
+ | как пример: | ||
+ | <code>bzr checkout --lightweight lp:ubuntu-doc/***** ubuntu-docs-*****</code> | ||
+ | <note tip>Вместо звездочек нужно указать точное имя дистрибутива Ubuntu</note></note> | ||
- | You can now test the translations you've done in Rosetta by inserting them into our repository and viewing them in Yelp. | + | Теперь вы можете проверить перевод, сделанный вами перевод в Rosetta, вставив его в наш репозиторий и просмотрев его в Yelp. |
- | - Download the LANG.po file for a particular document from Rosetta. For example the relevant templates for Intrepid can be found [[https://translations.launchpad.net/ubuntu/intrepid/+source/ubuntu-docs/|here]]. These instructions use the example of the french (fr) translation of the 'internet' document. | + | - Скачайте файл LANG.po для нужного вам документа из Rosetta. Например, шаблоны для Intrepid можно найти [[https://translations.launchpad.net/ubuntu/intrepid/+source/ubuntu-docs/|здесь]]. Эти инструкции приводятся для французского (fr) перевода документа 'internet'. |
- | - Get the Intrepid branch of our repository: | + | - Скачайте ветку Intrepid нашего репозитория: |
<code> | <code> | ||
sudo apt-get install bzr xmlto gettext gnome-doc-utils | sudo apt-get install bzr xmlto gettext gnome-doc-utils | ||
Строка 37: | Строка 42: | ||
</code> | </code> | ||
- | - Browse to the documentation directory | + | - Перейдите в каталог документации |
<code>cd ubuntu-docs-intrepid</code> | <code>cd ubuntu-docs-intrepid</code> | ||
- | - Insert the new po file in the relevant document folder, under the 'po' subfolder **using the naming scheme LANG.po**: | + | - Вставьте новый po-файл в подкаталог 'po' соответствующего каталога документов, **используя следующую схему наименования: LANG.po**: |
<code>mv ~/Desktop/internet-fr.po internet/po/fr.po</code> | <code>mv ~/Desktop/internet-fr.po internet/po/fr.po</code> | ||
- | - Run the translate script and choose the relevant document and language: | + | - Запустите сценарий translate, указав в качестве параметров соответствующий документ и язык: |
<code>./scripts/translate.sh -d internet -l fr</code> | <code>./scripts/translate.sh -d internet -l fr</code> | ||
- | - The script will update the docbook xml for your document and language and will check the file created for validity. It will print any errors as output. | + | - Сценарий обновит docbook xml для вашего документа и языка, а также проверит созданный файл на наличие ошибок и, в случае их наличия, покажет их вам. |
- | - Open the file in the GNOME help viewer, called yelp: | + | - Откройте файл в приложении для просмотра справки GNOME, которое называется yelp: |
<code>yelp file://${PWD}/internet/fr/internet.xml</code> | <code>yelp file://${PWD}/internet/fr/internet.xml</code> | ||
- | Yelp always requires the full path to the xml document. | + | Yelp всегда требует указания полного пути к документу xml. |
- | To build all documents with the latest translation run: | + | Чтобы скомпилировать все документы с новыми переводами, выполните: |
<code>for doc in $(cat libs/shipped-docs); do ./scripts/translate.sh -d $doc -l LANG; done</code> | <code>for doc in $(cat libs/shipped-docs); do ./scripts/translate.sh -d $doc -l LANG; done</code> | ||
- | A html version be created by running: | + | Html-версию можно создать, выполнив следующие команды: |
<code>mkdir -p build/html | <code>mkdir -p build/html | ||
for doc in $(cat libs/shipped-docs); do find ${doc}/LANG -name "*.xml" -exec xmlto -o build/html html-nochunks {} \;; done</code> | for doc in $(cat libs/shipped-docs); do find ${doc}/LANG -name "*.xml" -exec xmlto -o build/html html-nochunks {} \;; done</code> | ||
- | A nice formated html version (similar to help.ubuntu.com) be created by running: | + | Хорошо сформатированную html-версию (подобную help.ubuntu.com) можно создать, выполнив: |
<code> | <code> | ||
for doc in $(cat libs/shipped-docs); do | for doc in $(cat libs/shipped-docs); do | ||
Строка 65: | Строка 70: | ||
done | done | ||
</code> | </code> | ||
- | Create a copy of libs/ubuntu-html-chunk-cust.xsl into libs/ubuntu-html-chunk-cust-$lang.xsl to customize/localise it's content. Also check ubuntu-banner.xsl. | + | Создайте копию libs/ubuntu-html-chunk-cust.xsl в libs/ubuntu-html-chunk-cust-$lang.xsl, чтобы изменить/локализовать её содержимое. Также проверьте ubuntu-banner.xsl. |
- | LANG should be replaced by your language code. | + | Вместо LANG нужно указать код вашего языка. |
- | **NOTE:** if you wish to make any changes to the translation, you should do so in Rosetta. | + | **ПРИМЕЧАНИЕ:** если вы хотите внести какие-либо изменения в перевод, это нужно делать в Rosetta. |
- | ====== For Documentation Team Members ====== | + | ====== Для членов команды документирования ====== |
The rest of this page is a description of how the Documentation Team work gets translated and inserted into Ubuntu. It is primarily intended for reference of the Documentation Team: translators do not need to know all this information. | The rest of this page is a description of how the Documentation Team work gets translated and inserted into Ubuntu. It is primarily intended for reference of the Documentation Team: translators do not need to know all this information. | ||
- | ===== Package Requirements ===== | + | ===== Требования к пакетам ===== |
- | To install all packages required to build ubuntu-docs, including translations, run: | + | Для установки всех пакетов, необходимых для создания ubuntu-docs, включая переводы, выполните: |
<code>apt-get build-dep ubuntu-docs</code> | <code>apt-get build-dep ubuntu-docs</code> | ||
Строка 96: | Строка 101: | ||
* For documents spread over more than one file, these can be included as follows: | * For documents spread over more than one file, these can be included as follows: | ||
<code>xml2po -e -o output.pot chapter1.xml chapter2.xml</code> | <code>xml2po -e -o output.pot chapter1.xml chapter2.xml</code> | ||
- | * **IMPORTANT:** For documents which have an omf file, these should also be included in the pot file. | + | * **ВАЖНО:** For documents which have an omf file, these should also be included in the pot file. |
* As a result, generally the appropriate command is: | * As a result, generally the appropriate command is: | ||
<code>xml2po -e -o output.pot C/*.xml C/*.omf</code> | <code>xml2po -e -o output.pot C/*.xml C/*.omf</code> | ||
- | **NOTE:** We have an automatic script to generate POT files, called 'get-pot.sh'. Running this script refreshes the POT files for all documents. | + | **ПРИМЕЧАНИЕ:** We have an automatic script to generate POT files, called 'get-pot.sh'. Running this script refreshes the POT files for all documents. |
==== 2. Letting the translators work their magic ==== | ==== 2. Letting the translators work their magic ==== | ||
Строка 119: | Строка 124: | ||
---- | ---- | ||
[[/translate|На главную страницу переводчиков]] | [[/translate|На главную страницу переводчиков]] | ||
+ | {{tag>Переводы FIXME}} |