Localisation/ru: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 12: Line 12:
Одно из очень важных дел которое пользователи могут сделать для FreeCAD (если например они не имеют навыков программирования ), это помочь с переводом различных частей проекта (программа, сайт, вики, документация и т. д.) на другой язык. Вот как это можно сделать
Одно из очень важных дел которое пользователи могут сделать для FreeCAD (если например они не имеют навыков программирования ), это помочь с переводом различных частей проекта (программа, сайт, вики, документация и т. д.) на другой язык. Вот как это можно сделать


<div class="mw-translate-fuzzy">
=== Перевести программное обеспечение FreeCAD ===
=== Перевести программное обеспечение FreeCAD ===
FreeCAD использует стороннюю коллективную систему онлайн переводов, называемую [https://crowdin.net Crowdin]. Она проприетарная, но бесплатна для проектов с открытым исходным кодом. Ниже представлены инструкции по использованию этой системы.
FreeCAD использует стороннюю систему коллективных онлайн-переводов, называемую [https://crowdin.net Crowdin].
</div>


[[File:Logo-crowdin.png|320px]]
[[File:Logo-crowdin.png|320px]]

Revision as of 17:19, 11 May 2020

Обзор

Локализация это в общем процесс предоставления програмного обеспечения c пользовательским интерфейсом поддерживающем несколько языков. В FreeCAD вы можете установить язык пользовательского интерфейса в Правка → Настройки → Основные. FreeCAD использует Qt чтобы поддерживать несколько языков. В Unix/Linux системах, FreeCAD использует текущие настройки локали (языковые настройки) вашей системы по умолчанию.

Помощь с переводом FreeCAD

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

Перевести программное обеспечение FreeCAD

FreeCAD использует стороннюю систему коллективных онлайн-переводов, называемую Crowdin.

It is proprietary software but free to FOSS projects. Below are instructions on how to use it:

  • Отправляйтесь на страницу проекта перевода FreeCAD на Crowdin;
  • Войдите, создав новый профиль, или воспользовавшись сторонними аккаунтами (GitHub, GitLab, GMail итд...);
  • Щелкните иконку языка на котоый хотите перевести;
  • Начните переводить , щелкнув на Translate рядом с одним из файлов. Например, FreeCAD.ts содержит текстовые строки для главного окна FreeCAD.
  • Вы можете голосовать за существующие переводы, или вы можете создавать свой собственный.

Примечание: Если вы активно принимаете участие в переводе FreeCAD и хотите быть в курсе когда будет готов к запуску следующий релиз, так чтобы было время рассмотреть ваш перевод, пожалуйста подпишитесь на этот опрос: http://www.freecadweb.org/tracker/view.php?id=137

Translating external workbenches

Visit Translating an external workbench.

Перевод wiki

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

Примечание: чтобы иметь возможность перевести вики, вы должны сначала, конечно получить разрешение на редактирование вики.

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

Плагин для перевода

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

Инструмент описан в Extension:Translate и является частью Language Extension Bundle.

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

&lt;translate&gt; ... &lt;/translate&gt;

tags need to surround the entire page to activate the translation system, and the page needs to be marked for translation.

Чтобы увидеть пример того, как работает инструмент перевода, один раз плагин перевод активируется на странице, вы можете посетить Стартовую страницу. Вы увидите новую языковую строку меню внизу. Она была сгенерирована автоматически. Нажмите, например, на немецкую ссылку, это преместит Вас на стартовую страницу на немецком языке. Прямо под названием, вы можете прочитать "Эта страница представляет собой 'переведенную версию' страницы Стартовая страница и перевод завершен на хх%." (Хх - это текущий фактический процент перевода). Нажмите на ссылку "translated version", чтобы начать перевод, либо обновить или исправить существующий перевод.

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

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

Если вы не знаете, как поступить, не стесняйтесь обратится за помощью на форум.

Important notes

Every wiki user that has "Editor" permissions is able to launch the translate utility and write, save, and review translations.

However, only users with "Administrator" permissions are able to mark pages for translation. A page that is not marked for translation won't make use of the translation extension and won't be correctly synchronized to the English information.

Боковая панель (меню навигации слева) также может быть переведена. Пожалуйста, следуйте инструкциям на странице Localisation Sidebar.

Примечание: первый раз при переключении страниц на новую систему перевода, она теряет все свои старые "Ручные" переводы. Чтобы восстановить перевод, вам необходимо открыть более раннюю версию из архива, и копировать / вставлять абзацы вручную в новой системе перевода.

Translate the FreeCAD documentation

As per general consensus, the reference page in the wiki is the English page, which should be created first. If you want to change or add content to a page, you should do it to the English page first, and only once the update is completed, port the modification to the translated page.

Старые инструкции по переводу

These instructions are for historical background only. Translations should use the new system with the #Mediawiki Translation Extension described above.

So the first step is to check if the manual translation has already been started for your language (look in the left sidebar, under "manual").
If not, head to the forum and say that you want to start a new translation, we'll create the basic setup for the language you want to work on.
You must then gain wiki edit permission.
If your language is already listed, see what pages are still missing a translation (they will be listed in red). The technique is simple: go into a red page, and copy/paste the contents of the corresponding English page, and start translating.
Do not forget to include all the tags and templates from the original English page. Some of those templates will have an equivalent in your language (for example, there is a French Docnav template called Docnav/fr). You should use a slash and your language code in almost all the links. Look at other already translated pages to see how they did it.
Add a slash and your language code in the categories, like [[Category:Developer Documentation/fr]]
And if you are unsure, head to the forums and ask people to check what you did and tell you if it's right or not.
Four templates are commonly used in manual pages. These 4 templates have localized versions (Template:Docnav/fr, Template:fr, etc...)

  • Template:GuiCommand : is the Gui Command information block in upper-right of command documentation.
  • Template:Docnav : it is the navigation bar at the bottom of the pages, showing previous and next pages.
  • Template:Userdocnavi : gives direct links to the main base pages

Page Naming Convention
Please take note that, due to limitations in the Sourceforge implementation of the MediaWiki engine, we require that your pages all keep their original English counterpart's name, appending a slash and your language code. For example, the translated page for About FreeCAD should be About Freecad/es for Spanish, About FreeCAD/pl for polish, etc. The reason is simple: so that if translators go away, the wiki's administrators, who do not speak all languages, will know what these pages are for. This will facilitate maintenance and avoid lost pages.
If you want the Docnav template to show linked pages in your language, you can use redirect pages. They are basically shortcut links to the actual page. Here is an example with the French page for About FreeCAD.

  • The page About FreeCAD/fr is the page with content
  • The page À propos de FreeCAD contains this code:
#REDIRECT [[About_FreeCAD/fr]]
  • In the About FreeCAD/fr page, the Docnav code will look like this:
{{docnav/fr|[[Online_Help_Startpage/fr|Bienvenue dans l'aide en ligne de FreeCAD]]|[[Feature_list/fr|Fonctionnalités]]}}

The page "Bienvenue dans l'aide en ligne de FreeCAD" redirects to Online_Help_Startpage/fr, and the page "Fonctionnalités" redirects to Feature_list/fr.

Translate the FreeCAD website

Translation of the FreeCAD website is now done through Crowdin. The file is named homepage.po.

Development - How to Add Localisation

This section is for developers who want to add localisation to their code.

Подготовка собственных модулей/приложений для перевода

All of the above steps are performed by the "translation scripts" which are run by an administrator periodically.

Preparing your module for translation is quite easy. First, you need to ensure that you have a "translations" directory in myModule/Gui/Resources. Then open a terminal window (or Windows/OSX equivalent) in your "translations" directory and enter the following command:

lupdate -ts myModule.ts

This creates an empty translation file. Once this is done, you need to ensure that the translation scripts are updated as in this pull request.

Everything after this is automatic as far as a developer is concerned. The administrator will extract the text strings, the translators will translate them, then the administrator will extract the translations and update FreeCAD/master.

Требования

Older module translation techniques

Localization Older Methods describes the use of translation tools such as Qt Linguist, lupdate, lrelease, pylupdate4, etc in detail. Most of this is no longer required for FreeCAD/master modules, but may be helpful preparing and updating 3rd party modules.

Automating Crowdin Translation Updates

Currently FreeCAD maintainers use the Crowdin API via Crowdin Scripts to pull and push translations in to Crowdin and back in to the Github repo. The Crowdin API gives FreeCAD maintainers the ability to automate aspects of the project's translation workflow, for more info refer to the Crowdin API documentation.

Related Pages