We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Difference between revisions of "Using the LibreCAD Translation Server"

From LibreCAD wiki
Jump to: navigation, search
(finished inital version)
(Put in Category:Developers)
 
Line 88: Line 88:
 
==Pootle==
 
==Pootle==
 
Our server uses Pootle 2.1.6 for the moment.
 
Our server uses Pootle 2.1.6 for the moment.
 +
 +
[[Category:Developers]]

Latest revision as of 20:01, 25 April 2015

General

First Time User

You want to contribute in translating the LibreCAD GUI into your language and want to know where to start? Then go to the GUI Translators page first and see how to register your accounts for our Pootle Server and Forum.

Pootle

Pootle is the name of the software we use for translating the GUI. This software runs on our Web Server at http://translate.librecad.org/ and all you need is Web Browser and Internet access to use this Software.

Pootle Account

Join Language

After activating your account and login the first time, there is a link in the Quick Links section, where you can join the language(s) you want to work on. You can find this later on the MyAccount page in the Settings tab.

To join a language select it in the Languages list. If you want to contribute in multiple languages, hold down the Ctrl key (Command on Mac) while selecting the languages.

You also have to select the one and only project LibreCAD in the Projects list.

Then you will have the links to your language and LibreCAD project in your Dashboard.

Other settings

In the Settings tab of your account you may also change the Number of Rows to your taste. This is the number of lines (ID-Strings) to translate shown on one page.

If the Pootle Interface Language is available in your language, you can change this to your preferences.

Don't touch the Alternative Source Languages list, as we only have English as source language, there is nothing to select there.

Translating

To start translation, use the LibreCAD project link on your Dashboard. You will see the Overview tab with the two sub-projects plugins and ts. The plugins project keeps all the text from LibreCAD PlugIns and the ts project has all text from the main application.

Words need attention

Until translation is complete, you see links in the Overview Summary column with the number of words needing attention. Click on that link and you get directed to the first word or string that needs attention. Needing attention means, that there is no translation at all or there is a translation, but it is marked as fuzzy. After submitting or suggesting the translation you are directed to the next word needing attention.

Searching

If you found an issue in the application, you can search by entering the English source word or the translated word in the search box in the top right edge. After pressing ENTER your are directed to the first occurrence of the search term. If this is not the word you are searching for, click on the Next link below the translation editor, to find the next occurrence.

Suggestions

Translations may have one or multiple suggestions. These suggestion are made by members, who are not allowed to submit translations or by unregistered users. To work on suggestions change from Overview to the Review tab. There you find links View Suggestions for the sub-projects. They will direct you to the first word with suggestions.

When you accept a suggestion, it is transferred to the editor and you can edit it or submit it unchanged. Delete other suggestions if present, before submitting, or you will be directed to this translation later again.

I'm afraid, that there is a lot of SPAM in suggestions, because unregistered users are able to submit suggestions. Meanwhile there is a captcha for unregistered user, what reduces SPAM a lot.

Fuzzy

If you are not sure about a translation, you can check the fuzzy box on the right side of the editor. That allows you to store the translation in the database, but it is not released to the application. Fuzzy translations are shown when using the Words need attention mode. When the translation is checked or edited, uncheck the fuzzy box and submit it.

Google

On top of the source text is a Google icon. This was formerly to get a suggestion from Google Translate. Since Google has stopped their free API, this link is broken and out of order.

Copy to translation

With the icon right beside the Google icon you can copy the source text into the translation editor. This makes sense, if the translation is the same as the source or the source has formatting parts or placeholder which are not translated. Some tool tips for example has HTML tags included, copy the source into the editor and then change only the text part that has to be translated.

Submit

After editing a translation click the Submit button to save your changes. Be sure about the state of the fuzzy check box, only when it is unchecked, the translation will find its way to the application.

Context

Sometimes it is hard to know the meaning of a single word. Then you need the context for this word, you find it on top of the source field. With the context it is possible to find the matching place in the source code. Then you investigate the meaning of the word. If you don't have programming skills, don't hesitate to ask in the LibreCAD-translate forum for help.

Behind the scenes

GitHub Repository

The source code for LibreCAD is hosted on GitHub.

Qt UI and Applcation Framework

All the GUI text items are defined in C++ source files and Qt resource files. With tools from Qt all marked strings, words and shortcuts are extracted to a file in Qt's translation format (ts). For each language a separate ts file is needed. Qt has an offline tool for translating ts files, but for worldwide collaboration this is not very useful. After translation another tool generates from the translated ts files a binary dictionary (qm) file which is deployed with the application.

Translation Server

For worldwide collaboration to translate LibreCAD GUI in as many languages as possible, it's obvious to use a Web application for translation. LibreCAD uses Pootle for this job. The ts files are imported into Pootle database and on synchronisation an updated ts file is generated from database. All this happens on the Web Server.

Synchronisation

As the Translation server is not GitHub, we have to sync both servers. To minimise the commit activity this is a manual process. From time to time the Translation server pulls latest changes from GitHub to update the local Git repository. Then the changes from the Pootle server are merged to the local Git repository. At least the local Git repository is pushed back to GitHub. So changes on the Translation server can only be found on GitHub after this sync process. And only the version on GitHub is recognised for deployment. If you have reached a milestone in your translation progress and wish to have a sync, please post your request in the LibreCAD-translate forum.

Standard Dialogs

There are standard dialogs in LibreCAD, e.g. file open or save, which may be not translated in other languages. The problem is, that these dialogs use a translation dictionary file deployed with Qt, because the source for these dialogs is in the Qt source code files. LibreCAD deploys the Qt qm files, but LibreCAD supports much more languages as Qt. So if Qt doesn't support your language, these standard dialogs are untranslated when LibreCAD is used in this language.

Pootle

Our server uses Pootle 2.1.6 for the moment.